Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | protected function generateToken(Tester $I, Example $example) |
||
21 | { |
||
22 | $I->amHttpAuthenticated($example['client'], $example['clientPass']); |
||
23 | $I->sendPOST($this->getRoute(), [ |
||
24 | 'grant_type' => 'password', |
||
25 | 'username' => $example['user'], |
||
26 | 'password' => $example['userPass'], |
||
27 | ]); |
||
28 | $I->seeResponseCodeIs(HttpCode::OK); |
||
29 | $I->seeResponseIsJson(); |
||
30 | $I->seeResponseMatchesJsonType([ |
||
31 | 'access_token' => 'string:regex(/[0-9a-f]{40}/)', |
||
32 | 'refresh_token' => 'string:regex(/[0-9a-f]{40}/)', |
||
33 | ]); |
||
34 | $I->storeToken( |
||
35 | $example['tokenName'], |
||
36 | $I->grabDataFromResponseByJsonPath('access_token')[0] |
||
37 | ); |
||
38 | } |
||
39 | |||
48 |
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.