Code Duplication    Length = 10-13 lines in 2 locations

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

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

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

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