Lines
100.00%
4 / 4
Functions and Methods
100.00%
1 / 1
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Borough | 100.00% | 4 / 4 | 100.00% | 1 / 1 | 2 | 100.00% | 1 / 1 | |||
| parseData | 100.00% | 4 / 4 | 100.00% | 1 / 1 | 2 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | /** | |
| 4 | * @package 115Mandant | |
| 5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG | |
| 6 | **/ | |
| 7 | ||
| 8 | namespace BO\Zmsdldb\File; | |
| 9 | ||
| 10 | use BO\Zmsdldb\Entity\Borough as Entity; | |
| 11 | use BO\Zmsdldb\Collection\Boroughs as Collection; | |
| 12 | ||
| 13 | /** | |
| 14 | * Common methods shared by access classes | |
| 15 | * | |
| 16 | * @extends Base<Collection, Entity> | |
| 17 | */ | |
| 18 | class Borough extends Base | |
| 19 | { | |
| 20 | /** | |
| 21 | * @return Collection | |
| 22 | */ | |
| 23 | #[\Override] | |
| 24 | protected function parseData(mixed $data) | |
| 25 | { | |
| 26 | $itemList = new Collection(); | |
| 27 | foreach ($data['data']['boroughs'] as $item) { | |
| 28 | $itemList[$item['id']] = new Entity($item); | |
| 29 | } | |
| 30 | return $itemList; | |
| 31 | } | |
| 32 | } |