Commit 8d5d3188 authored by Anton Smirnov's avatar Anton Smirnov

Fix docs and examples

parent aca908af
......@@ -21,14 +21,16 @@ The source code and the graphics are provided under the [MIT License].
Install it with Composer
``composer require 'sandfoxme/monsterid:^1.2'``.
```bash
composer require 'sandfoxme/monsterid:^1.2'
```
## Usage
```php
<?php
use function \SandFox\MonsterID\build_monster;
use function SandFox\MonsterID\build_monster;
header('Content-type: image/png');
echo build_monster('sandfox@sandfox.me', 150);
......
......@@ -33,7 +33,7 @@ Function-style
<?php
// use function is available for PHP >= 5.6, call with full namespace in earlier versions
use function \SandFox\MonsterID\build_monster;
use function SandFox\MonsterID\build_monster;
$image = build_monster('sandfox@sandfox.me', 150);
......@@ -47,7 +47,7 @@ Object-style
<?php
use \SandFox\MonsterID\Monster;
use SandFox\MonsterID\Monster;
$monster = new Monster('sandfox@sandfox.me');
......
......@@ -3,7 +3,7 @@
require __DIR__ . '/../vendor/autoload.php';
// use function is available for PHP >= 5.6, call with full namespace in earlier versions
use function \SandFox\MonsterID\build_monster;
use function SandFox\MonsterID\build_monster;
// make me an avatar
$image = build_monster('sandfox@sandfox.me');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment