| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 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 = []) |
||
| 26 | { |
||
| 27 | $data = $this->view($view, $data); |
||
| 28 | |||
| 29 | return parent::json($data, $status, $headers, $context); |
||
|
|
|||
| 30 | } |
||
| 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.