| Total Complexity | 2 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class LocationProvider |
||
| 10 | { |
||
| 11 | /** @var City[] */ |
||
| 12 | private array $cities; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @throws ExceptionInterface |
||
| 16 | */ |
||
| 17 | public function __construct(array $cities, SerializerInterface $serializer) |
||
| 18 | { |
||
| 19 | $this->cities = $serializer->denormalize($cities, City::class . '[]'); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function find(string $name): ?City |
||
| 25 | } |
||
| 26 | } |
||
| 27 |