| 1 | <?php | ||
| 7 | class PortTransformer extends Fractal\TransformerAbstract | ||
| 8 | { | ||
| 9 | |||
| 10 | /** | ||
| 11 | * List of resources possible to include | ||
| 12 | * | ||
| 13 | * @var array | ||
| 14 | */ | ||
| 15 | protected $availableIncludes = ['device']; | ||
| 16 | |||
| 17 | /** | ||
| 18 | * Turn this item object into a generic array | ||
| 19 | * | ||
| 20 | * @return array | ||
| 21 | */ | ||
| 22 | public function transform(Port $port) | ||
| 34 | |||
| 35 | /** | ||
| 36 | * Include Device | ||
| 37 | * | ||
| 38 | * @return Fractal\Resource\Item | ||
| 39 | */ | ||
| 40 | public function includeDevice(Port $port) | ||
| 45 | } | ||
| 46 | 
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: