$fulfillable of type object<Carbon_Fields\Con...ulfillable\Fulfillable> is not a sub-type of object<Carbon_Fields\Con...er\Condition\Condition>. It seems like you assume a concrete implementation of the interface Carbon_Fields\Container\Fulfillable\Fulfillable to be always present.
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.
Loading history...
21
}
22
23
if ( is_a( $fulfillable, 'Carbon_Fields\\Container\\Fulfillable\\Fulfillable_Collection' ) ) {
$fulfillable of type object<Carbon_Fields\Con...ulfillable\Fulfillable> is not a sub-type of object<Carbon_Fields\Con...Fulfillable_Collection>. It seems like you assume a concrete implementation of the interface Carbon_Fields\Container\Fulfillable\Fulfillable to be always present.
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.
Loading history...
25
}
26
27
Incorrect_Syntax_Exception::raise( 'Attempted to translate an unsupported object: ' . print_r( $fulfillable, true ) );
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.