Conditions | 3 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | function authenticate(ServerRequestInterface $request, array $requestData): ?ClientInterface |
||
35 | { |
||
36 | $client = $this->clientStorage->get($requestData['client_id']); |
||
37 | if($client instanceof ConfidentialClient && $client->getPassword() == $requestData['client_secret']) { |
||
38 | return $client; |
||
39 | } |
||
40 | return null; |
||
41 | } |
||
42 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.