Lines 100.00% 4 / 4
Methods 100.00% 2 / 2
Classes 100.00% 1 / 1
Name Lines Methods CRAP
 __construct 100.00% 1 / 1 100.00% 1 / 1 1
 verify 100.00% 3 / 3 100.00% 1 / 1 3
19final readonly class DevGoogleIdTokenVerifier implements GoogleIdTokenVerifierInterface
20{
21    public function __construct(
22        #[AutowireDecorated] private GoogleIdTokenVerifierInterface $inner,
23        #[Autowire(env: 'bool:APP_FAKE_GOOGLE_TOKENS')] private bool $fakeTokensEnabled,
24    ) {
25    }
26
27    #[\Override]
28    public function verify(string $idToken): ?array
29    {
30        if ($this->fakeTokensEnabled && \str_starts_with($idToken, 'fake|')) {
31            return new FakeGoogleIdTokenVerifier()->verify($idToken);
32        }
33
34        return $this->inner->verify($idToken);
35    }
36}