| Total Complexity | 5 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Index implements Responsable |
||
| 12 | { |
||
| 13 | private $route; |
||
| 14 | |||
| 15 | public function toResponse($request) |
||
| 16 | { |
||
| 17 | $this->route = $request->get('route'); |
||
| 18 | |||
| 19 | return Resource::collection($this->tutorials()); |
||
|
|
|||
| 20 | } |
||
| 21 | |||
| 22 | private function tutorials() |
||
| 26 | } |
||
| 27 | |||
| 28 | private function homeTutorials() |
||
| 35 | } |
||
| 36 | |||
| 37 | private function routeTutorials() |
||
| 44 | } |
||
| 45 | } |
||
| 46 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: