| 1 | <?php namespace App\LaravelRestCms; |
||
| 5 | trait HierarchyTransformerTrait { |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Constructor |
||
| 9 | */ |
||
| 10 | public function __construct() |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Include Parent |
||
| 17 | * |
||
| 18 | * @param \App\LaravelRestCms\BaseModel |
||
| 19 | * @return \League\Fractal\ItemResource |
||
| 20 | */ |
||
| 21 | public function includeParent(BaseModel $model) |
||
| 25 | |||
| 26 | } |
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.