Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | public function __invoke(JWTTokenManagerInterface $jwtManager): JsonResponse |
||
21 | { |
||
22 | $username = uniqid('user_'); |
||
23 | |||
24 | $payload = [ |
||
25 | 'iat' => time(), |
||
26 | 'sub' => $username, |
||
27 | 'jti' => uniqid(), |
||
28 | 'iss' => '/api/token', |
||
29 | 'foo' => 'bar', |
||
30 | ]; |
||
31 | |||
32 | $user = new ApiGwAuthenticationUser($username); |
||
33 | |||
34 | return new JsonResponse( |
||
35 | [ |
||
36 | 'token' => $jwtManager->createFromPayload($user, $payload), |
||
|
|||
37 | ] |
||
41 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.