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

@@ 265-274 (lines=10) @@
262
     * @param SAML2_Response $response
263
     * @return Response
264
     */
265
    public function renderSamlResponse($view, SAML2_Response $response)
266
    {
267
        $responseContext = $this->getResponseContext();
268
269
        return $this->render($view, [
270
            'acu'        => $responseContext->getDestination(),
271
            'response'   => $this->getResponseAsXML($response),
272
            'relayState' => $responseContext->getRelayState()
273
        ]);
274
    }
275
276
    /**
277
     * @param string   $view