| Total Complexity | 6 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class PublicKeyCredentialCreationValidator |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var AttestationStatementSupportManager |
||
| 22 | */ |
||
| 23 | private $attestationStatementSupportManager; |
||
| 24 | |||
| 25 | public function __construct(AttestationStatementSupportManager $attestationStatementSupportManager) |
||
| 26 | { |
||
| 27 | $this->attestationStatementSupportManager = $attestationStatementSupportManager; |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @see https://www.w3.org/TR/webauthn/#registering-a-new-credential |
||
| 32 | */ |
||
| 33 | public function isValid(PublicKeyCredential $publicKeyCredential, PublicKeyCredentialCreationOptions $publicKeyCredentialCreationOptions): bool |
||
| 46 | } |
||
|
|
|||
| 47 | } |
||
| 49 |
For hinted functions/methods where all return statements with the correct type are only reachable via conditions, ?null? gets implicitly returned which may be incompatible with the hinted type. Let?s take a look at an example: