1 | <?php |
||
25 | class ApiController extends Controller |
||
26 | { |
||
27 | /** |
||
28 | * @param string $name |
||
29 | * |
||
30 | * @return Response |
||
|
|||
31 | * |
||
32 | * @Route("/hello/{name}", name="api_hello") |
||
33 | */ |
||
34 | public function serviceAction(string $name) |
||
38 | |||
39 | /** |
||
40 | * @return Response |
||
41 | * |
||
42 | * @OAuth2(scope="profile openid") |
||
43 | * @Route("/hello-profile", name="api_scope") |
||
44 | */ |
||
45 | public function scopeProtectionAction() |
||
49 | } |
||
50 |
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.