1 | <?php |
||
17 | final class Authenticator implements IAuthenticator |
||
18 | { |
||
19 | use SmartObject; |
||
20 | |||
21 | /** @var \SixtyEightPublishers\DoctrineQueryObjects\ExecutableQueryObjectFactoryInterface */ |
||
22 | private $executableQueryObjectFactory; |
||
23 | |||
24 | /** @var \SixtyEightPublishers\User\Authentication\Query\AuthenticatorQueryObjectFactoryInterface */ |
||
25 | private $authenticatorQueryFactory; |
||
26 | |||
27 | /** |
||
28 | * @param \SixtyEightPublishers\DoctrineQueryObjects\ExecutableQueryObjectFactoryInterface $executableQueryObjectFactory |
||
29 | * @param \SixtyEightPublishers\User\Authentication\Query\AuthenticatorQueryObjectFactoryInterface $authenticatorQueryFactory |
||
30 | */ |
||
31 | public function __construct(ExecutableQueryObjectFactoryInterface $executableQueryObjectFactory, AuthenticatorQueryObjectFactoryInterface $authenticatorQueryFactory) |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | public function authenticate(array $credentials): IIdentity |
||
54 | |||
55 | /** |
||
56 | * @param array $credentials |
||
57 | * |
||
58 | * @return array |
||
59 | * @throws \Nette\Security\AuthenticationException |
||
60 | */ |
||
61 | private function validateCredentials(array $credentials): array |
||
82 | |||
83 | /** |
||
84 | * @param string $username |
||
85 | * |
||
86 | * @return \SixtyEightPublishers\User\Authentication\Entity\UserInterface |
||
87 | * @throws \Nette\Security\AuthenticationException |
||
88 | */ |
||
89 | private function findUser(string $username): UserInterface |
||
118 | } |
||
119 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.