Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
PickupCallCancel | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
readResponse | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
2 |
1 | <?php |
2 | |
3 | /** |
4 | * @package Zmsadmin |
5 | * @copyright BerlinOnline Stadtportal GmbH & Co. KG |
6 | **/ |
7 | |
8 | namespace BO\Zmsadmin; |
9 | |
10 | /** |
11 | * Init Controller to cancel called pickup |
12 | * |
13 | */ |
14 | class PickupCallCancel extends BaseController |
15 | { |
16 | /** |
17 | * @SuppressWarnings(Param) |
18 | * @return String |
19 | */ |
20 | public function readResponse( |
21 | \Psr\Http\Message\RequestInterface $request, |
22 | \Psr\Http\Message\ResponseInterface $response, |
23 | array $args |
24 | ) { |
25 | $workstation = \App::$http->readGetResult('/workstation/', ['resolveReferences' => 2])->getEntity(); |
26 | |
27 | if ($workstation->process['id']) { |
28 | \App::$http->readDeleteResult('/workstation/process/'); |
29 | } |
30 | return \BO\Slim\Render::withHtml( |
31 | $response, |
32 | 'block/pickup/canceled.twig', |
33 | array() |
34 | ); |
35 | } |
36 | } |