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

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