This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
14
{
15
/** @var Clover */
16
private $clover;
17
18
/** @var OutputFile */
19
private $targetFile;
20
21
/**
22
* Clover constructor.
23
* @param OutputFile $targetFile
24
*/
25
2
public function __construct(OutputFile $targetFile)
It seems like new \SebastianBergmann\C...overage\Report\Clover() of type object<SebastianBergmann...Coverage\Report\Clover> is incompatible with the declared type object<Paraunit\Coverage\Processor\Clover> of property $clover.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
Loading history...
28
2
$this->targetFile = $targetFile;
29
2
}
30
31
/**
32
* @param CodeCoverage $codeCoverage
33
* @throws \RuntimeException
34
*/
35
1
public function process(CodeCoverage $codeCoverage)
The call to Clover::process() has too many arguments starting with $this->targetFile->getFilePath().
This check compares calls to functions or methods with their respective definitions.
If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the
check may pick up the wrong definition and report false positives. One codebase
where this has been known to happen is Wordpress.
In this case you can add the @ignorePhpDoc
annotation to the duplicate definition and it will be ignored.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.