Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
WorkstationProcessParked
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 1
12
0.00% covered (danger)
0.00%
0 / 1
 readResponse
0.00% covered (danger)
0.00%
0 / 12
0.00% covered (danger)
0.00%
0 / 1
12
1<?php
2
3/**
4 * @package Zmsadmin
5 * @copyright BerlinOnline Stadtportal GmbH & Co. KG
6 **/
7
8namespace BO\Zmsadmin;
9
10use BO\Zmsentities\Process as Entity;
11
12/**
13  * Init Controller to display next Button Template only
14  *
15  */
16class WorkstationProcessParked extends 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    ): \Psr\Http\Message\ResponseInterface {
28        $workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 2])->getEntity();
29        $validator = $request->getAttribute('validator');
30        $noRedirect = $validator->getParameter('noredirect')->isNumber()->getValue();
31        if ($workstation->process['id']) {
32            \App::$http->readDeleteResult('/workstation/process/parked/')->getEntity();
33        }
34        if (1 == $noRedirect) {
35            return $response;
36        }
37        return \BO\Slim\Render::redirect(
38            'workstationProcessCallButton',
39            array(),
40            array()
41        );
42    }
43}