Code Duplication    Length = 12-12 lines in 2 locations

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

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

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

@@ 375-386 (lines=12) @@
372
    /**
373
     * @return \Surfnet\StepupGateway\GatewayBundle\Saml\ResponseContext
374
     */
375
    public function getResponseContext()
376
    {
377
        $stateHandler = $this->get('gateway.proxy.state_handler');
378
379
        $responseContextServiceId = $stateHandler->getResponseContextServiceId();
380
381
        if (!$responseContextServiceId) {
382
            return $this->get(GatewayController::RESPONSE_CONTEXT_SERVICE_ID);
383
        }
384
385
        return $this->get($responseContextServiceId);
386
    }
387
}
388