1 | <?php |
||
26 | class ApiController extends Controller |
||
27 | { |
||
28 | /** |
||
29 | * @param string $name |
||
30 | * |
||
31 | * @return Response |
||
|
|||
32 | * |
||
33 | * @Route("/hello/{name}", name="api_hello") |
||
34 | */ |
||
35 | public function serviceAction(string $name) |
||
39 | |||
40 | /** |
||
41 | * @return Response |
||
42 | * |
||
43 | * @OAuth2(scope="profile openid") |
||
44 | * @Route("/hello-profile", name="api_scope") |
||
45 | */ |
||
46 | public function scopeProtectionAction() |
||
50 | |||
51 | /** |
||
52 | * @return Response |
||
53 | * |
||
54 | * @OAuth2(token_type="MAC") |
||
55 | * @Route("/hello-token", name="api_token") |
||
56 | */ |
||
57 | public function tokenTypeProtectionAction() |
||
61 | |||
62 | /** |
||
63 | * @Route("/hello-resolver", name="api_resolver") |
||
64 | * |
||
65 | * @param AccessToken $accessToken |
||
66 | * |
||
67 | * @return Response |
||
68 | */ |
||
69 | public function accessTokenResolverAction(AccessToken $accessToken) |
||
73 | } |
||
74 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.