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.
Loading history...
32
*
33
* @Route("/hello/{name}", name="api_hello")
34
*/
35
public function serviceAction(string $name)
36
{
37
return new JsonResponse(['name' => $name, 'message' => sprintf('Hello %s!', $name)]);
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.
Loading history...
42
*
43
* @OAuth2(scope="profile openid")
44
* @Route("/scope", name="api_scope")
45
*/
46
public function scopeProtectionAction()
47
{
48
return new JsonResponse(['name' => 'I am protected by scope', 'message' => 'Hello!']);
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.