The expression return array(TheCodingMa...'createCmsMiddleware')) returns the type array<string,array<integer,string>> which is incompatible with the return type mandated by Interop\Container\Servic...terface::getFactories() of array<mixed,callable>.
In the issue above, the returned value is violating the contract defined by the
mentioned interface.
Let's take a look at an example:
interfaceHasName{/** @return string */publicfunctiongetName();}className{public$name;}classUserimplementsHasName{/** @return string|Name */publicfunctiongetName(){returnnewName('foo');// This is a violation of the ``HasName`` interface// which only allows a string value to be returned.}}
The expression return array(TheCodingMa...'updatePriorityQueue')) returns the type array<string,array<integer,string>> which is incompatible with the return type mandated by Interop\Container\Servic...erface::getExtensions() of array<mixed,callable>.
In the issue above, the returned value is violating the contract defined by the
mentioned interface.
Let's take a look at an example:
interfaceHasName{/** @return string */publicfunctiongetName();}className{public$name;}classUserimplementsHasName{/** @return string|Name */publicfunctiongetName(){returnnewName('foo');// This is a violation of the ``HasName`` interface// which only allows a string value to be returned.}}
This check looks for calls to methods that do not seem to exist on a given type.
It looks for the method on the type itself as well as in inherited classes or
implemented interfaces.
This is most likely a typographical error or the method has been renamed.
The expression return $queue could return the type null which is incompatible with the type-hinted return SplPriorityQueue. Consider adding an additional type-check to rule them out.
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: