Lines
100.00%
14 / 14
Methods
100.00%
2 / 2
Classes
100.00%
1 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| readResponse | 100.00% | 11 / 11 | 100.00% | 1 / 1 | 1 | ||
| [BO\Zmsbackend\Api\BaseController] __invoke | 100.00% | 3 / 3 | 100.00% | 1 / 1 | 1 | ||
| 16 | class WorkstationProcessWaitingnumber extends \BO\Zmsbackend\Api\BaseController | |
| 17 | { | |
| 18 | /** | |
| 19 | * @SuppressWarnings(Param) | |
| 20 | * @return \Psr\Http\Message\ResponseInterface | |
| 21 | */ | |
| 22 | #[\Override] | |
| 23 | public function readResponse( | |
| 24 | \Psr\Http\Message\RequestInterface $request, | |
| 25 | \Psr\Http\Message\ResponseInterface $response, | |
| 26 | array $args | |
| 27 | ) { | |
| 28 | \BO\Zmsbackend\Connection\Select::getWriteConnection(); | |
| 29 | (new \BO\Zmsbackend\Helper\User($request))->checkPermissions(); | |
| 30 | $input = Validator::input()->isJson()->assertValid()->getValue(); | |
| 31 | $process = new \BO\Zmsentities\Process($input); | |
| 32 | $process = \BO\Zmsbackend\Process\Service\ProcessStatusQueued::init()->writeNewFromAdmin($process, \App::$now); | |
| 33 | $process->testValid(); | |
| 34 | $message = \BO\Zmsbackend\Api\Response\Message::create($request); | |
| 35 | $message->data = $process; | |
| 36 | ||
| 37 | $response = Render::withLastModified($response, time(), '0'); | |
| 38 | $response = Render::withJson($response, $message->setUpdatedMetaData(), $message->getStatuscode()); | |
| 39 | return $response; | |
| 40 | } | |
| 41 | } |
Inherited from BO\Zmsbackend\Api\BaseController
| 20 | public function __invoke(RequestInterface $request, ResponseInterface $response, array $args) | |
| 21 | { | |
| 22 | $request = $this->initRequest($request); | |
| 23 | $noCacheResponse = \BO\Slim\Render::withLastModified($response, time(), '0'); | |
| 24 | return $this->readResponse($request, $noCacheResponse, $args); | |
| 25 | } |