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

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