Code Duplication    Length = 10-11 lines in 2 locations

src/Surfnet/StepupGateway/SamlStepupProviderBundle/Controller/SamlProxyController.php 2 locations

@@ 266-276 (lines=11) @@
263
     * @param string $destination
264
     * @return SAMLResponse
265
     */
266
    private function createResponseFailureResponse(Provider $provider, $destination, $message)
267
    {
268
        $response = $this->createResponse($provider, $destination);
269
        $response->setStatus([
270
            'Code' => Constants::STATUS_RESPONDER,
271
            'SubCode' => Constants::STATUS_AUTHN_FAILED,
272
            'Message' => $message
273
        ]);
274
275
        return $response;
276
    }
277
278
    /**
279
     * Response that indicates that the authentication could not be performed correctly. In this context it means
@@ 286-295 (lines=10) @@
283
     * @param string $destination
284
     * @return SAMLResponse
285
     */
286
    private function createAuthnFailedResponse(Provider $provider, $destination)
287
    {
288
        $response = $this->createResponse($provider, $destination);
289
        $response->setStatus([
290
            'Code'    => Constants::STATUS_RESPONDER,
291
            'SubCode' => Constants::STATUS_AUTHN_FAILED
292
        ]);
293
294
        return $response;
295
    }
296
297
    /**
298
     * Creates a standard response with default status Code (success)