| 1 | <?php  | 
            ||
| 20 | trait ElementCriteriaTrait  | 
            ||
| 21 | { | 
            ||
| 22 | /**  | 
            ||
| 23 | * @param array $criteria  | 
            ||
| 24 | * @return ResourceCriteriaInterface  | 
            ||
| 25 | */  | 
            ||
| 26 | public abstract function getCriteria(array $criteria = []): ResourceCriteriaInterface;  | 
            ||
| 27 | |||
| 28 | /**  | 
            ||
| 29 | * @param Resources $field  | 
            ||
| 30 | * @param null $criteria  | 
            ||
| 31 | * @return ResourceCriteriaInterface  | 
            ||
| 32 | */  | 
            ||
| 33 | protected function resolveCriteria(Resources $field, $criteria = null): ResourceCriteriaInterface  | 
            ||
| 57 | }  | 
            ||
| 58 | 
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: