Code Duplication    Length = 10-13 lines in 2 locations

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

@@ 291-300 (lines=10) @@
288
     * @param SAMLResponse $response
289
     * @return Response
290
     */
291
    public function renderSamlResponse($view, SAMLResponse $response)
292
    {
293
        $responseContext = $this->getResponseContext();
294
295
        return $this->render($view, [
296
            'acu'        => $responseContext->getDestination(),
297
            'response'   => $this->getResponseAsXML($response),
298
            'relayState' => $responseContext->getRelayState()
299
        ]);
300
    }
301
302
    /**
303
     * @param string   $view

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

@@ 355-367 (lines=13) @@
352
     * @param SAMLResponse $response
353
     * @return Response
354
     */
355
    public function renderSamlResponse($view, StateHandler $stateHandler, SAMLResponse $response)
356
    {
357
        $response = $this->render($view, [
358
            'acu'        => $response->getDestination(),
359
            'response'   => $this->getResponseAsXML($response),
360
            'relayState' => $stateHandler->getRelayState()
361
        ]);
362
363
        // clear the state so we can call again :)
364
        $stateHandler->clear();
365
366
        return $response;
367
    }
368
369
    /**
370
     * @param string   $view