Code Duplication    Length = 10-13 lines in 3 locations

src/Surfnet/StepupGateway/GatewayBundle/Saml/ResponseContext.php 1 location

@@ 69-80 (lines=12) @@
66
     */
67
    private $targetServiceProvider;
68
69
    public function __construct(
70
        IdentityProvider $identityProvider,
71
        SamlEntityService $samlEntityService,
72
        ProxyStateHandler $stateHandler,
73
        LoggerInterface $logger
74
    ) {
75
        $this->hostedIdentityProvider = $identityProvider;
76
        $this->samlEntityService      = $samlEntityService;
77
        $this->stateHandler           = $stateHandler;
78
        $this->logger                 = $logger;
79
        $this->generationTime         = new DateTime('now', new DateTimeZone('UTC'));
80
    }
81
82
    /**
83
     * The ACS location requested in the AuthnRequest.

src/Surfnet/StepupGateway/SamlStepupProviderBundle/Saml/ProxyResponseFactory.php 1 location

@@ 64-76 (lines=13) @@
61
     */
62
    private $currentTime;
63
64
    public function __construct(
65
        LoggerInterface $logger,
66
        IdentityProvider $hostedIdentityProvider,
67
        StateHandler $stateHandler,
68
        AssertionSigningService $assertionSigningService
69
    ) {
70
        $this->logger                  = $logger;
71
        $this->hostedIdentityProvider  = $hostedIdentityProvider;
72
        $this->stateHandler            = $stateHandler;
73
        $this->assertionSigningService = $assertionSigningService;
74
75
        $this->currentTime = new DateTime('now', new DateTimeZone('UTC'));
76
    }
77
78
    /**
79
     * @param Assertion $assertion

src/Surfnet/StepupGateway/SecondFactorOnlyBundle/Saml/ResponseFactory.php 1 location

@@ 54-63 (lines=10) @@
51
     */
52
    private $assertionSigningService;
53
54
    public function __construct(
55
        IdentityProvider $hostedIdentityProvider,
56
        ProxyStateHandler $proxyStateHandler,
57
        AssertionSigningService $assertionSigningService
58
    ) {
59
        $this->hostedIdentityProvider    = $hostedIdentityProvider;
60
        $this->proxyStateHandler         = $proxyStateHandler;
61
        $this->assertionSigningService   = $assertionSigningService;
62
        $this->currentTime = new \DateTime('now', new \DateTimeZone('UTC'));
63
    }
64
65
    /**
66
     * @param ResponseContext $responseContext