1 | <?php |
||
24 | class PrivateChannelAuthenticator |
||
25 | { |
||
26 | /** @var CredentialsGenerator */ |
||
27 | private $credentialsGenerator; |
||
28 | |||
29 | /** @var ChannelAuthenticatorInterface[]|iterable */ |
||
30 | private $channelAuthenticators; |
||
31 | |||
32 | /** |
||
33 | * @param CredentialsGenerator $credentialsGenerator |
||
34 | * @param ChannelAuthenticatorInterface[]|iterable $channelAuthenticators |
||
35 | */ |
||
36 | public function __construct(CredentialsGenerator $credentialsGenerator, iterable $channelAuthenticators) |
||
41 | |||
42 | /** |
||
43 | * @param Request $request |
||
44 | * |
||
45 | * @return array |
||
46 | */ |
||
47 | public function authChannelsForUserFromRequest(Request $request): array |
||
64 | |||
65 | /** |
||
66 | * @param string $client |
||
67 | * @param string $channel |
||
68 | * |
||
69 | * @return string|null |
||
70 | */ |
||
71 | private function authChannelForUser(string $client, string $channel): ?string |
||
82 | |||
83 | /** |
||
84 | * @param string $channel |
||
85 | * |
||
86 | * @return ChannelAuthenticatorInterface|null |
||
87 | */ |
||
88 | private function findAppropriateChannelAuthenticator(string $channel): ?ChannelAuthenticatorInterface |
||
98 | |||
99 | /** |
||
100 | * @param Request $request |
||
101 | * |
||
102 | * @throws BadRequestHttpException |
||
103 | * |
||
104 | * @return array |
||
105 | */ |
||
106 | private function processRequest(Request $request): array |
||
122 | } |
||
123 |
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.