Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 384-395 (lines=12) @@
381
    /**
382
     * @return \Surfnet\StepupGateway\GatewayBundle\Saml\ResponseContext
383
     */
384
    public function getResponseContext()
385
    {
386
        $stateHandler = $this->get('gateway.proxy.state_handler');
387
388
        $responseContextServiceId = $stateHandler->getResponseContextServiceId();
389
390
        if (!$responseContextServiceId) {
391
            return $this->get(GatewayController::RESPONSE_CONTEXT_SERVICE_ID);
392
        }
393
394
        return $this->get($responseContextServiceId);
395
    }
396
}
397

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

@@ 196-207 (lines=12) @@
193
    /**
194
     * @return \Surfnet\StepupGateway\GatewayBundle\Saml\ResponseContext
195
     */
196
    public function getResponseContext()
197
    {
198
        $stateHandler = $this->get('gateway.proxy.state_handler');
199
200
        $responseContextServiceId = $stateHandler->getResponseContextServiceId();
201
202
        if (!$responseContextServiceId) {
203
            return $this->get(static::RESPONSE_CONTEXT_SERVICE_ID);
204
        }
205
206
        return $this->get($responseContextServiceId);
207
    }
208
209
    /**
210
     * @param SAMLResponse $response