Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
7 / 7 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
1 / 1 |
Office | |
100.00% |
7 / 7 |
|
100.00% |
3 / 3 |
4 | |
100.00% |
1 / 1 |
parseData | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
2 | |||
fetchList | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
fetchPath | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
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\Office as Entity; |
11 | use BO\Zmsdldb\Collection\Offices as Collection; |
12 | |
13 | /** |
14 | * Common methods shared by access classes |
15 | * |
16 | */ |
17 | class Office extends Base |
18 | { |
19 | protected function parseData($data) |
20 | { |
21 | $itemList = new Collection(); |
22 | foreach ($data['data']['office'] as $item) { |
23 | $itemList[$item['path']] = new Entity($item); |
24 | $itemList[$item['plural']] = $itemList[$item['path']]; |
25 | } |
26 | return $itemList; |
27 | } |
28 | |
29 | public function fetchList() |
30 | { |
31 | return $this->getItemList(); |
32 | } |
33 | |
34 | public function fetchPath($itemId) |
35 | { |
36 | return $this->fetchId($itemId); |
37 | } |
38 | } |