Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Warehouse
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
2
100.00% covered (success)
100.00%
1 / 1
 readSubjectsList
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
2
1<?php
2
3namespace BO\Zmsdb;
4
5use BO\Zmsentities\Exchange;
6use BO\Zmsentities\Scope as ScopeEntity;
7
8class Warehouse extends Base
9{
10    protected $subjects = [
11        [
12            'subject' => 'waitingscope',
13            'description' => 'Wartestatistik Standort',
14            'right' => 'scope'
15        ],
16        [
17            'subject' => 'waitingdepartment',
18            'description' => 'Wartestatistik Behörde',
19            'right' => 'department'
20        ],
21        [
22            'subject' => 'waitingorganisation',
23            'description' => 'Wartestatistik Organisation',
24            'right' => 'organisation'
25        ],
26        [
27            'subject' => 'waitingowner',
28            'description' => 'Wartestatistik München',
29            'right' => 'superuser'
30        ],
31        [
32            'subject' => 'clientscope',
33            'description' => 'Kundenstatistik Standort',
34            'right' => 'scope'
35        ],
36        [
37            'subject' => 'clientdepartment',
38            'description' => 'Kundenstatistik Behörde',
39            'right' => 'department'
40        ],
41        [
42            'subject' => 'clientorganisation',
43            'description' => 'Kundenstatistik Organisation',
44            'right' => 'organisation'
45        ],
46        [
47            'subject' => 'clientowner',
48            'description' => 'Kundenstatistik München',
49            'right' => 'superuser'
50        ],
51        [
52            'subject' => 'requestscope',
53            'description' => 'Dienstleistungsstatistik Standort',
54            'right' => 'scope'
55        ],
56        [
57            'subject' => 'requestdepartment',
58            'description' => 'Dienstleistungsstatistik Behörde',
59            'right' => 'department'
60        ],
61        [
62            'subject' => 'requestorganisation',
63            'description' => 'Dienstleistungsstatistik Organisation',
64            'right' => 'organisation'
65        ],
66        [
67            'subject' => 'requestowner',
68            'description' => 'Dienstleistungsstatistik München',
69            'right' => 'superuser'
70        ],
71        [
72            'subject' => 'useraccount',
73            'description' => 'Nutzerdaten mit E-Mail-Adresse und Rechten',
74            'right' => 'superuser'
75        ],
76        [
77            'subject' => 'slotscope',
78            'description' => 'Gebuchte Zeitschlitze eines Standortes gruppiert nach Datum',
79            'right' => 'superuser'
80        ],
81        [
82            'subject' => 'unassignedscope',
83            'description' => 'Standorte ohne Zuordnung zur DLDB mit Terminen',
84            'right' => 'superuser'
85        ],
86        [
87            'subject' => 'availabilityreview',
88            'description' => 'Review Öffnungszeiten',
89            'right' => 'superuser'
90        ],
91    ];
92
93    public function readSubjectsList()
94    {
95        $entity = (new Exchange())->withLessData();
96        $entity->addDictionaryEntry('subject', 'string', 'subject name');
97        $entity->addDictionaryEntry('description', 'string', 'subject description');
98        $entity->addDictionaryEntry('right', 'string', 'useraccount right for this subject', 'useraccount.rights');
99        foreach ($this->subjects as $subject) {
100            $entity->addDataSet(array_values($subject));
101        }
102        return $entity;
103    }
104}