Code Duplication    Length = 9-9 lines in 3 locations

php/Controllers/API/GenericServiceInvokeController.php 1 location

@@ 132-140 (lines=9) @@
129
        $this->successResponseHeader = $options['success-response-header'];
130
    }
131
132
    public function __invoke(): Response
133
    {
134
        /** @var Request $request */
135
        $request = $this->controllerHelper->getCurrentRequest();
136
137
        Assert::isInstanceOf($request, Request::class, "Cannot use controller outside of request-scope!");
138
139
        return $this->callService($request);
140
    }
141
142
    public function callService(Request $request): Response
143
    {

php/Controllers/GenericExceptionResponseController.php 1 location

@@ 136-144 (lines=9) @@
133
        }
134
    }
135
136
    public function __invoke(): Response
137
    {
138
        /** @var Request $request */
139
        $request = $this->controllerHelper->getCurrentRequest();
140
141
        Assert::isInstanceOf($request, Request::class, "Cannot use controller outside of request-scope!");
142
143
        return $this->executeInnerControllerSafely($request);
144
    }
145
146
    public function executeInnerControllerSafely(Request $request): Response
147
    {

php/Controllers/GenericTemplateRenderController.php 1 location

@@ 69-77 (lines=9) @@
66
        $this->authorizationAttribute = $options['authorization-attribute'];
67
    }
68
69
    public function __invoke(): Response
70
    {
71
        /** @var Request $request */
72
        $request = $this->controllerHelper->getCurrentRequest();
73
74
        Assert::isInstanceOf($request, Request::class, "Cannot use controller outside of request-scope!");
75
76
        return $this->renderTemplate($request);
77
    }
78
79
    public function renderTemplate(Request $request): Response
80
    {