Code Duplication    Length = 10-13 lines in 2 locations

src/Surfnet/StepupGateway/GatewayBundle/Controller/GatewayController.php 1 location

@@ 165-174 (lines=10) @@
162
     * @param SAMLResponse $response
163
     * @return Response
164
     */
165
    public function renderSamlResponse($view, SAMLResponse $response)
166
    {
167
        $responseContext = $this->getResponseContext();
168
169
        return $this->render($view, [
170
            'acu'        => $responseContext->getDestination(),
171
            'response'   => $this->getResponseAsXML($response),
172
            'relayState' => $responseContext->getRelayState()
173
        ]);
174
    }
175
176
    /**
177
     * @param string   $view

src/Surfnet/StepupGateway/SamlStepupProviderBundle/Controller/SamlProxyController.php 1 location

@@ 228-240 (lines=13) @@
225
     * @param SAMLResponse $response
226
     * @return Response
227
     */
228
    public function renderSamlResponse($view, StateHandler $stateHandler, SAMLResponse $response)
229
    {
230
        $response = $this->render($view, [
231
            'acu'        => $response->getDestination(),
232
            'response'   => $this->getResponseAsXML($response),
233
            'relayState' => $stateHandler->getRelayState()
234
        ]);
235
236
        // clear the state so we can call again :)
237
        $stateHandler->clear();
238
239
        return $response;
240
    }
241
242
    /**
243
     * @param string   $view