Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
13 / 13
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
WorkstationProcessCancelNext
100.00% covered (success)
100.00%
13 / 13
100.00% covered (success)
100.00%
1 / 1
3
100.00% covered (success)
100.00%
1 / 1
 readResponse
100.00% covered (success)
100.00%
13 / 13
100.00% covered (success)
100.00%
1 / 1
3
1<?php
2
3/**
4 * @package Zmsadmin
5 * @copyright BerlinOnline Stadtportal GmbH & Co. KG
6 **/
7
8namespace BO\Zmsadmin;
9
10/**
11  * Init Controller to display next Button Template only
12  *
13  */
14class WorkstationProcessCancelNext extends BaseController
15{
16    /**
17     * @SuppressWarnings(Param)
18     * @return \Psr\Http\Message\ResponseInterface
19     */
20    #[\Override]
21    public function readResponse(
22        \Psr\Http\Message\RequestInterface $request,
23        \Psr\Http\Message\ResponseInterface $response,
24        array $args
25    ): \Psr\Http\Message\ResponseInterface {
26        $workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 2])->getEntity();
27        $validator = $request->getAttribute('validator');
28        $excludedIds = $validator->getParameter('exclude')->isString()->getValue();
29        $excludedIds = ($excludedIds) ? $excludedIds : '';
30        if ($workstation->process['id']) {
31            \App::$http->readDeleteResult('/workstation/process/', ['action' => 'requeue_and_skip_to_next'])->getEntity();
32        }
33        return \BO\Slim\Render::redirect(
34            'workstationProcessNext',
35            array(),
36            array(
37                'exclude' => $excludedIds
38            )
39        );
40    }
41}