| 1 | <?php  | 
            ||
| 11 | abstract class ResourceAPIResponseDataFactory { | 
            ||
| 12 | |||
| 13 | /**  | 
            ||
| 14 | * @param null|Resource $resource  | 
            ||
| 15 | * @return APIResponseData  | 
            ||
| 16 | * @throws UnableToCreateAPIResponseDataException  | 
            ||
| 17 | */  | 
            ||
| 18 | abstract public function toAPIResponseData(?Resource $resource): APIResponseData;  | 
            ||
| 19 | |||
| 20 | /**  | 
            ||
| 21 | * Uses above method for each resource, extracting the data into an array, creating a new APIResponseData from that array.  | 
            ||
| 22 | * @param null|Resource[] $resources  | 
            ||
| 23 | * @return APIResponseData  | 
            ||
| 24 | * @throws UnableToCreateAPIResponseDataException  | 
            ||
| 25 | */  | 
            ||
| 26 | 10 | public function multipleToAPIResponseData(?array $resources): APIResponseData  | 
            |
| 36 | }  | 
            ||
| 37 | 
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: