Lines
96.15%
25 / 26
Functions and Methods
66.66%
2 / 3
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ExchangeUnassignedscope | 96.15% | 25 / 26 | 66.66% | 2 / 3 | 4 | 0.00% | 0 / 1 | |||
| readEntity | 91.66% | 11 / 12 | 0.00% | 0 / 1 | 2.00 | |||||
| readSubjectList | 100.00% | 9 / 9 | 100.00% | 1 / 1 | 1 | |||||
| readPeriodList | 100.00% | 5 / 5 | 100.00% | 1 / 1 | 1 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | namespace BO\Zmsbackend\Exchange\Service; | |
| 4 | ||
| 5 | use BO\Zmsentities\Exchange; | |
| 6 | ||
| 7 | class ExchangeUnassignedscope extends \BO\Zmsbackend\Base | |
| 8 | { | |
| 9 | public function readEntity(): Exchange | |
| 10 | { | |
| 11 | $entity = new Exchange(); | |
| 12 | $entity['title'] = "Nicht der DLDB zugeordnete Standorte mit Terminen"; | |
| 13 | $entity->addDictionaryEntry('StandortID', 'string', 'ID of a scope', 'scope.id'); | |
| 14 | $entity->addDictionaryEntry('Bezeichnung', 'string', 'name of a scope'); | |
| 15 | $entity->addDictionaryEntry('TerminAnzahl', 'number', 'number of appointments'); | |
| 16 | $entity->addDictionaryEntry('TerminDaten', 'string', 'date of appointments'); | |
| 17 | ||
| 18 | $raw = $this | |
| 19 | ->getReader() | |
| 20 | ->fetchAll(constant("\BO\Zmsbackend\Exchange\Repository\ExchangeUnassignedscope::QUERY_READ_REPORT"), []); | |
| 21 | foreach ($raw as $entry) { | |
| 22 | $entity->addDataSet(array_values($entry)); | |
| 23 | } | |
| 24 | return $entity; | |
| 25 | } | |
| 26 | ||
| 27 | public function readSubjectList(): Exchange | |
| 28 | { | |
| 29 | $entity = new Exchange(); | |
| 30 | $entity['title'] = "Nicht der DLDB zugeordnete Standorte mit Terminen"; | |
| 31 | $entity->setPeriod(new \DateTimeImmutable(), new \DateTimeImmutable()); | |
| 32 | $entity->addDictionaryEntry('subject', 'string', 'ID'); | |
| 33 | $entity->addDictionaryEntry('periodstart', 'string', 'Datum von'); | |
| 34 | $entity->addDictionaryEntry('periodend', 'string', 'Datum bis'); | |
| 35 | $entity->addDictionaryEntry('description', 'string', 'Beschreibung'); | |
| 36 | $entity->addDataSet(["_", "", "", "Alle Standorte"]); | |
| 37 | return $entity; | |
| 38 | } | |
| 39 | ||
| 40 | public function readPeriodList(): Exchange | |
| 41 | { | |
| 42 | $entity = new Exchange(); | |
| 43 | $entity['title'] = "Nicht der DLDB zugeordnete Standorte mit Terminen"; | |
| 44 | $entity->addDictionaryEntry('description', 'string', 'Beschreibung'); | |
| 45 | $entity->addDataSet(["_"]); | |
| 46 | return $entity; | |
| 47 | } | |
| 48 | } |