Lines
100.00%
18 / 18
Functions and Methods
100.00%
1 / 1
Classes and Traits
100.00%
1 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Message | 100.00% | 18 / 18 | 100.00% | 1 / 1 | 2 | 100.00% | 1 / 1 | |||
| readResponse | 100.00% | 18 / 18 | 100.00% | 1 / 1 | 2 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | /** | |
| 4 | * | |
| 5 | * @package Zmsticketprinter | |
| 6 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG | |
| 7 | * | |
| 8 | */ | |
| 9 | ||
| 10 | namespace BO\Zmsticketprinter; | |
| 11 | ||
| 12 | use BO\Mellon\Validator; | |
| 13 | use Psr\Http\Message\RequestInterface; | |
| 14 | use Psr\Http\Message\ResponseInterface; | |
| 15 | ||
| 16 | class Message extends BaseController | |
| 17 | { | |
| 18 | /** | |
| 19 | * @SuppressWarnings(UnusedFormalParameter) | |
| 20 | * @return ResponseInterface | |
| 21 | */ | |
| 22 | #[\Override] | |
| 23 | public function readResponse( | |
| 24 | RequestInterface $request, | |
| 25 | ResponseInterface $response, | |
| 26 | array $args | |
| 27 | ) { | |
| 28 | $ticketprinterHelper = (new Helper\Ticketprinter($args, $request)); | |
| 29 | $validator = $request->getAttribute('validator'); | |
| 30 | $scopeId = $validator->getParameter('scopeId')->isNumber()->getValue(); | |
| 31 | $notHome = $validator->getParameter('notHome')->isNumber()->getValue(); | |
| 32 | $messages = Validator::value($args['status'])->isString()->getValue(); | |
| 33 | ||
| 34 | return \BO\Slim\Render::withHtml( | |
| 35 | $response, | |
| 36 | 'page/message.twig', | |
| 37 | array( | |
| 38 | 'debug' => \App::DEBUG, | |
| 39 | 'homeRedirect' => ($notHome) ? false : true, | |
| 40 | 'title' => 'Wartennumernausgabe erfolgreich', | |
| 41 | 'ticketprinter' => $ticketprinterHelper->getEntity(), | |
| 42 | 'scopeId' => $scopeId, | |
| 43 | 'organisation' => $ticketprinterHelper->getOrganisation(), | |
| 44 | 'messages' => array($messages) | |
| 45 | ) | |
| 46 | ); | |
| 47 | } | |
| 48 | } |