Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
Office
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
3 / 3
4
100.00% covered (success)
100.00%
1 / 1
 parseData
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
1 / 1
2
 fetchList
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 fetchPath
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 * @package 115Mandant
5 * @copyright BerlinOnline Stadtportal GmbH & Co. KG
6 **/
7
8namespace BO\Zmsdldb\File;
9
10use BO\Zmsdldb\Entity\Office as Entity;
11use BO\Zmsdldb\Collection\Offices as Collection;
12
13/**
14  * Common methods shared by access classes
15  *
16  */
17class Office extends Base
18{
19    #[\Override]
20    protected function parseData($data)
21    {
22        $itemList = new Collection();
23        foreach ($data['data']['office'] as $item) {
24            $itemList[$item['path']] = new Entity($item);
25            $itemList[$item['plural']] = $itemList[$item['path']];
26        }
27        return $itemList;
28    }
29
30    public function fetchList()
31    {
32        return $this->getItemList();
33    }
34
35    public function fetchPath($itemId)
36    {
37        return $this->fetchId($itemId);
38    }
39}