| 1 | <?php |
||
| 12 | class DepartmentOutput extends Fractal\TransformerAbstract |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * List of resources to automatically include |
||
| 16 | * |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | protected $defaultIncludes = ['managers']; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Generic array |
||
| 23 | * |
||
| 24 | * @param Departments $department |
||
| 25 | * @return array |
||
| 26 | */ |
||
| 27 | public function transform(Departments $department) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Include Managers |
||
| 39 | * |
||
| 40 | * @param Departments $department |
||
| 41 | * @return Fractal\Resource\Item |
||
| 42 | */ |
||
| 43 | public function includeManagers(Departments $department) |
||
| 48 | } |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.