Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 130-140 (lines=11) @@
127
     * @param ServiceProvider $targetServiceProvider
128
     * @return SAML2_Response
129
     */
130
    private function createNewAuthnResponse(SAML2_Assertion $newAssertion, ServiceProvider $targetServiceProvider)
131
    {
132
        $response = new SAML2_Response();
133
        $response->setAssertions([$newAssertion]);
134
        $response->setIssuer($this->hostedIdentityProvider->getEntityId());
135
        $response->setIssueInstant($this->getTimestamp());
136
        $response->setDestination($targetServiceProvider->getAssertionConsumerUrl());
137
        $response->setInResponseTo($this->stateHandler->getRequestId());
138
139
        return $response;
140
    }
141
142
    /**
143
     * @param string $interval a DateInterval compatible interval to skew the time with

src/Surfnet/StepupGateway/GatewayBundle/Service/ProxyResponseService.php 1 location

@@ 163-173 (lines=11) @@
160
     * @param ServiceProvider $targetServiceProvider
161
     * @return \SAML2_Response
162
     */
163
    private function createNewAuthnResponse(SAML2_Assertion $newAssertion, ServiceProvider $targetServiceProvider)
164
    {
165
        $response = new \SAML2_Response();
166
        $response->setAssertions([$newAssertion]);
167
        $response->setIssuer($this->hostedIdentityProvider->getEntityId());
168
        $response->setIssueInstant($this->getTimestamp());
169
        $response->setDestination($targetServiceProvider->getAssertionConsumerUrl());
170
        $response->setInResponseTo($this->proxyStateHandler->getRequestId());
171
172
        return $response;
173
    }
174
175
    /**
176
     * @param string $interval a \DateInterval compatible interval to skew the time with