1 | <?php |
||
16 | class CheckPhpMessDetectionPreCommitExecutor extends PreCommitExecutor |
||
17 | { |
||
18 | /** @var PhpMDHandler */ |
||
19 | private $phpMDHandler; |
||
20 | |||
21 | /** |
||
22 | * @param HookConfigExtraToolInterface $hookConfigInterface |
||
23 | * @param RecursiveToolInterface $recursiveToolInterface |
||
24 | */ |
||
25 | 2 | public function __construct( |
|
32 | |||
33 | /** |
||
34 | * @return string |
||
35 | */ |
||
36 | 2 | protected function commandName() |
|
40 | |||
41 | /** |
||
42 | * @param OutputInterface $output |
||
43 | * @param array $files |
||
44 | * @param string $needle |
||
45 | * |
||
46 | * @throws PHPMDViolationsException |
||
47 | */ |
||
48 | 2 | public function run(OutputInterface $output, array $files, $needle) |
|
60 | } |
||
61 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.