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

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