| 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("/scope", name="api_scope") |
||
| 45 | */ |
||
| 46 | public function scopeProtectionAction() |
||
| 50 | } |
||
| 51 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.