| 1 | <?php  | 
            ||
| 9 | class Controller extends BaseController  | 
            ||
| 10 | { | 
            ||
| 11 | use ViewAwareTrait;  | 
            ||
| 12 | |||
| 13 | /**  | 
            ||
| 14 | * @param string $view A short notation view (a:b:c) "AppBundle:Default:homepage" or "homepage"  | 
            ||
| 15 | * (for same name view class as controller under View folder with suffix View instead of  | 
            ||
| 16 | * Controller for e.g. For AppBundle\Controller\DefaultController AppBundle\View\DefaultView  | 
            ||
| 17 | * @param mixed $data  | 
            ||
| 18 | * @param int $status  | 
            ||
| 19 | * @param array $headers  | 
            ||
| 20 | * @param array $context  | 
            ||
| 21 | *  | 
            ||
| 22 | * @return JsonResponse  | 
            ||
| 23 | * @throws \InvalidArgumentException  | 
            ||
| 24 | */  | 
            ||
| 25 | protected function jsonView($view, $data, $status = 200, $headers = [], $context = [])  | 
            ||
| 31 | }  | 
            ||
| 32 | 
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()method in theSoncalls the wrong method in the parent class.