Code Duplication    Length = 10-13 lines in 2 locations

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

@@ 257-266 (lines=10) @@
254
     * @param SAMLResponse $response
255
     * @return Response
256
     */
257
    public function renderSamlResponse($view, SAMLResponse $response)
258
    {
259
        $responseContext = $this->getResponseContext();
260
261
        return $this->render($view, [
262
            'acu'        => $responseContext->getDestination(),
263
            'response'   => $this->getResponseAsXML($response),
264
            'relayState' => $responseContext->getRelayState()
265
        ]);
266
    }
267
268
    /**
269
     * @param string   $view

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

@@ 293-305 (lines=13) @@
290
     * @param SAMLResponse $response
291
     * @return Response
292
     */
293
    public function renderSamlResponse($view, StateHandler $stateHandler, SAMLResponse $response)
294
    {
295
        $response = $this->render($view, [
296
            'acu'        => $response->getDestination(),
297
            'response'   => $this->getResponseAsXML($response),
298
            'relayState' => $stateHandler->getRelayState()
299
        ]);
300
301
        // clear the state so we can call again :)
302
        $stateHandler->clear();
303
304
        return $response;
305
    }
306
307
    /**
308
     * @param string   $view