It seems like $reference defined by parameter $reference on line 48 can also be of type object<Kunstmaan\NodeBun...ntity\HasNodeInterface>; however, Kunstmaan\NodeBundle\Hel...getPossibleChildTypes() does only seem to accept string, maybe add an additional type check?
This check looks at variables that have been passed in as parameters and are passed out again
to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.