Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
11 / 11
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
OrganisationDelete
100.00% covered (success)
100.00%
11 / 11
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 readResponse
100.00% covered (success)
100.00%
11 / 11
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3/**
4 *
5 * @package Zmsadmin
6 * @copyright BerlinOnline Stadtportal GmbH & Co. KG
7 *
8 */
9
10namespace BO\Zmsadmin;
11
12use BO\Mellon\Validator;
13use BO\Slim\Render;
14
15/**
16 * Delete an Organisation
17 */
18class OrganisationDelete extends BaseController
19{
20    /**
21     *
22     * @return \Psr\Http\Message\ResponseInterface
23     */
24    #[\Override]
25    public function readResponse(
26        \Psr\Http\Message\RequestInterface $request,
27        \Psr\Http\Message\ResponseInterface $response,
28        array $args
29    ): \Psr\Http\Message\ResponseInterface {
30        $entityId = Validator::value($args['id'])->isNumber()
31            ->getValue();
32        \App::$http->readDeleteResult('/organisation/' . $entityId . '/')
33            ->getEntity();
34        return \BO\Slim\Render::redirect(
35            'owner_overview',
36            array(),
37            array(
38                'success' => 'organisation_deleted'
39            )
40        );
41    }
42}