1 | <?php |
||
21 | class AuthenticationMethodManager |
||
22 | { |
||
23 | /** |
||
24 | * @var AuthenticationMethod[] |
||
25 | */ |
||
26 | private $methods = []; |
||
27 | |||
28 | /** |
||
29 | * @var string[] |
||
30 | */ |
||
31 | private $names = []; |
||
32 | |||
33 | /** |
||
34 | * @param AuthenticationMethod $method |
||
35 | * |
||
36 | * @return AuthenticationMethodManager |
||
37 | */ |
||
38 | public function add(AuthenticationMethod $method): self |
||
48 | |||
49 | /** |
||
50 | * @return string[] |
||
51 | */ |
||
52 | public function list(): array |
||
56 | |||
57 | /** |
||
58 | * @param string $name |
||
59 | * |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function has(string $name): bool |
||
66 | |||
67 | /** |
||
68 | * @param string $name |
||
69 | * |
||
70 | * @throws \InvalidArgumentException |
||
71 | * |
||
72 | * @return AuthenticationMethod |
||
73 | */ |
||
74 | public function get(string $name): AuthenticationMethod |
||
83 | |||
84 | /** |
||
85 | * @return AuthenticationMethod[] |
||
86 | */ |
||
87 | public function all(): array |
||
91 | |||
92 | /** |
||
93 | * @param ServerRequestInterface $request |
||
94 | * @param AuthenticationMethod $authenticationMethod |
||
|
|||
95 | * @param mixed $clientCredentials The client credentials found in the request |
||
96 | * |
||
97 | * @throws OAuth2Exception |
||
98 | * |
||
99 | * @return null|ClientId |
||
100 | */ |
||
101 | public function findClientIdAndCredentials(ServerRequestInterface $request, AuthenticationMethod &$authenticationMethod = null, &$clientCredentials = null) |
||
126 | |||
127 | /** |
||
128 | * @param ServerRequestInterface $request |
||
129 | * @param Client $client |
||
130 | * @param AuthenticationMethod $authenticationMethod |
||
131 | * @param mixed $clientCredentials |
||
132 | * |
||
133 | * @return bool |
||
134 | */ |
||
135 | public function isClientAuthenticated(ServerRequestInterface $request, Client $client, AuthenticationMethod $authenticationMethod, $clientCredentials): bool |
||
144 | |||
145 | /** |
||
146 | * @return string[] |
||
147 | */ |
||
148 | public function getSchemesParameters(): array |
||
160 | } |
||
161 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.