Lines
100.00%
21 / 21
Methods
100.00%
2 / 2
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| readResponse | 100.00% | 18 / 18 | 100.00% | 1 / 1 | 2 | ||
| [BO\Zmsticketprinter\BaseController] __invoke | 100.00% | 3 / 3 | 100.00% | 1 / 1 | 1 | ||
| 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 | } |
Inherited from BO\Zmsticketprinter\BaseController
| 21 | public function __invoke(RequestInterface $request, ResponseInterface $response, array $args) | |
| 22 | { | |
| 23 | $request = $this->initRequest($request); | |
| 24 | $noCacheResponse = \BO\Slim\Render::withLastModified($response, time(), '0'); | |
| 25 | return $this->readResponse($request, $noCacheResponse, $args); | |
| 26 | } |