| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 18 | public function __construct($options) |
||
| 19 | { |
||
| 20 | $resolver = new OptionsResolver(); |
||
| 21 | $resolver->setRequired('name'); |
||
| 22 | $resolver->setRequired('coordinates'); |
||
| 23 | $resolver->addAllowedTypes('name', 'string'); |
||
| 24 | $resolver->setNormalizer( |
||
| 25 | 'coordinates', |
||
| 26 | function (Options $options, $value) { |
||
| 27 | return new Coordinates($value); |
||
| 28 | } |
||
| 29 | ); |
||
| 30 | $this->options = $resolver->resolve($options); |
||
| 31 | } |
||
| 32 | |||
| 49 |