Skip to content

Commit 57e1b4b

Browse files
committed
small updates in example usage
1 parent c8c8efb commit 57e1b4b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@ Please read the docs of [lib-country](https://github.com/phine/lib-country) firs
1818
### Using Services
1919
```php
2020
// From ServiceManager
21-
/** @var Phine\Country\Loader\Loader */
21+
/** @var Phine\Country\Loader\Loader $countryLoader */
2222
$countryLoader = $serviceManager->get('CountryLoader');
2323
```
2424

2525
### Using hydrator strategy
2626
```php
2727
$strategy = new HtCountryModule\Hydrator\Strategy\CountryStrategy;
28+
// or $strategy = $serviceManager->get('HtCountryModule\Hydrator\Strategy\CountryStrategy');
2829

29-
/** @var Phine\Country\Country */
30+
/** @var Phine\Country\Country $country */
3031
$country = $strategy->hydrate('US');
3132

3233
echo $strategy->extract($country); // will print US
@@ -35,6 +36,7 @@ echo $strategy->extract($country); // will print US
3536
### Using country validator
3637
```php
3738
$validator = new HtCountryModule\Validator\CountryValidator;
39+
// or $validator = $serviceManager->get('ValidatorManager')->get('CountryValidator');
3840
var_dump($validator->isValid('asdfasfd')); // bool(false)
3941
var_dump($validator->isValid('US')); // bool(true)
4042
```

0 commit comments

Comments
 (0)