Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| Warehouse | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
| readSubjectsList | |
100.00% |
7 / 7 |
|
100.00% |
1 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace BO\Zmsdb; |
| 4 | |
| 5 | use BO\Zmsentities\Exchange; |
| 6 | use BO\Zmsentities\Scope as ScopeEntity; |
| 7 | |
| 8 | class 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' => 'notificationscope', |
| 53 | 'description' => 'SMS-Statistik Standort', |
| 54 | 'right' => 'scope' |
| 55 | ], |
| 56 | [ |
| 57 | 'subject' => 'notificationdepartment', |
| 58 | 'description' => 'SMS-Statistik Behörde', |
| 59 | 'right' => 'department' |
| 60 | ], |
| 61 | [ |
| 62 | 'subject' => 'notificationorganisation', |
| 63 | 'description' => 'SMS-Statistik Organisation', |
| 64 | 'right' => 'organisation' |
| 65 | ], |
| 66 | [ |
| 67 | 'subject' => 'notificationowner', |
| 68 | 'description' => 'SMS-Statistik München', |
| 69 | 'right' => 'superuser' |
| 70 | ], |
| 71 | [ |
| 72 | 'subject' => 'requestscope', |
| 73 | 'description' => 'Dienstleistungsstatistik Standort', |
| 74 | 'right' => 'scope' |
| 75 | ], |
| 76 | [ |
| 77 | 'subject' => 'requestdepartment', |
| 78 | 'description' => 'Dienstleistungsstatistik Behörde', |
| 79 | 'right' => 'department' |
| 80 | ], |
| 81 | [ |
| 82 | 'subject' => 'requestorganisation', |
| 83 | 'description' => 'Dienstleistungsstatistik Organisation', |
| 84 | 'right' => 'organisation' |
| 85 | ], |
| 86 | [ |
| 87 | 'subject' => 'requestowner', |
| 88 | 'description' => 'Dienstleistungsstatistik München', |
| 89 | 'right' => 'superuser' |
| 90 | ], |
| 91 | [ |
| 92 | 'subject' => 'useraccount', |
| 93 | 'description' => 'Nutzerdaten mit E-Mail-Adresse und Rechten', |
| 94 | 'right' => 'superuser' |
| 95 | ], |
| 96 | [ |
| 97 | 'subject' => 'slotscope', |
| 98 | 'description' => 'Gebuchte Zeitschlitze eines Standortes gruppiert nach Datum', |
| 99 | 'right' => 'superuser' |
| 100 | ], |
| 101 | [ |
| 102 | 'subject' => 'unassignedscope', |
| 103 | 'description' => 'Standorte ohne Zuordnung zur DLDB mit Terminen', |
| 104 | 'right' => 'superuser' |
| 105 | ], |
| 106 | [ |
| 107 | 'subject' => 'availabilityreview', |
| 108 | 'description' => 'Review Öffnungszeiten', |
| 109 | 'right' => 'superuser' |
| 110 | ], |
| 111 | ]; |
| 112 | |
| 113 | public function readSubjectsList() |
| 114 | { |
| 115 | $entity = (new Exchange())->withLessData(); |
| 116 | $entity->addDictionaryEntry('subject', 'string', 'subject name'); |
| 117 | $entity->addDictionaryEntry('description', 'string', 'subject description'); |
| 118 | $entity->addDictionaryEntry('right', 'string', 'useraccount right for this subject', 'useraccount.rights'); |
| 119 | foreach ($this->subjects as $subject) { |
| 120 | $entity->addDataSet(array_values($subject)); |
| 121 | } |
| 122 | return $entity; |
| 123 | } |
| 124 | } |