Code Duplication    Length = 12-12 lines in 2 locations

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

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

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