Code Duplication    Length = 7-7 lines in 2 locations

src/Surfnet/StepupGateway/GatewayBundle/Service/StepUpAuthenticationService.php 2 locations

@@ 147-153 (lines=7) @@
144
        $this->logger->info(sprintf('Added SP\'s default Loa "%s" as candidate', $spConfiguredLoas['__default__']));
145
146
        if ($authenticatingIdp) {
147
            if (array_key_exists($authenticatingIdp->getEntityId(), $spConfiguredLoas)) {
148
                $loaCandidates->add($spConfiguredLoas[$authenticatingIdp->getEntityId()]);
149
                $this->logger->info(sprintf(
150
                    'Added SP\'s Loa "%s" for this IdP as candidate',
151
                    $spConfiguredLoas[$authenticatingIdp->getEntityId()]
152
                ));
153
            }
154
155
            $idpConfiguredLoas = $authenticatingIdp->get('configuredLoas');
156
            $loaCandidates->add($idpConfiguredLoas['__default__']);
@@ 161-167 (lines=7) @@
158
                sprintf('Added authenticating IdP\'s default Loa "%s" as candidate', $spConfiguredLoas['__default__'])
159
            );
160
161
            if (array_key_exists($serviceProvider->getEntityId(), $idpConfiguredLoas)) {
162
                $loaCandidates->add($idpConfiguredLoas[$serviceProvider->getEntityId()]);
163
                $this->logger->info(sprintf(
164
                    'Added authenticating IdP\'s Loa "%s" for this SP as candidate',
165
                    $idpConfiguredLoas[$serviceProvider->getEntityId()]
166
                ));
167
            }
168
        }
169
170
        if (!count($loaCandidates)) {