Code Duplication    Length = 10-13 lines in 2 locations

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

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

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

@@ 248-257 (lines=10) @@
245
     * @param SAML2_Response $response
246
     * @return Response
247
     */
248
    public function renderSamlResponse($view, SAML2_Response $response)
249
    {
250
        $responseContext = $this->getResponseContext();
251
252
        return $this->render($view, [
253
            'acu'        => $responseContext->getDestination(),
254
            'response'   => $this->getResponseAsXML($response),
255
            'relayState' => $responseContext->getRelayState()
256
        ]);
257
    }
258
259
    /**
260
     * @param string   $view