| 1 | <?php |
||
| 22 | class ObjectDefinitionNode extends TypeDefinitionNode implements ProvidesFieldNodes, ProvidesInterfaceNodes |
||
| 23 | { |
||
| 24 | use FieldsProvider; |
||
| 25 | use InterfacesProvider; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param Definition $parent |
||
| 29 | * @return Definition|ObjectDefinition |
||
| 30 | */ |
||
| 31 | 15 | public function resolve(Definition $parent): Definition |
|
| 35 | } |
||
| 36 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.