Are you sure the usage of $this->report->process($...his->options['target']) targeting SebastianBergmann\CodeCo...\Html\Facade::process() seems to always return null.
This check looks for function or method calls that always return null and whose
return value is used.
The expression return $this->report->pr...his->options['target']) returns the type void which is incompatible with the return type mandated by DVDoug\Behat\CodeCoverag...ortInterface::process() of null|string.
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 function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.