1 | <?php |
||
14 | class PhpUnitToolHandler implements CommandHandlerInterface |
||
15 | { |
||
16 | const EXECUTING_MESSAGE = 'Running unit tests'; |
||
17 | /** |
||
18 | * @var OutputInterface |
||
19 | */ |
||
20 | private $output; |
||
21 | /** |
||
22 | * @var PhpUnitProcessorInterface |
||
23 | */ |
||
24 | private $phpUnitProcessor; |
||
25 | /** |
||
26 | * @var PhpUnitProcessorInterface |
||
27 | */ |
||
28 | private $phpUnitRandomizerProcessor; |
||
29 | |||
30 | /** |
||
31 | * PhpUnitTool constructor. |
||
32 | * |
||
33 | * @param OutputInterface $output |
||
34 | * @param PhpUnitProcessorInterface $phpUnitProcessor |
||
35 | * @param PhpUnitProcessorInterface $phpUnitRandomizerProcessor |
||
36 | */ |
||
37 | 2 | public function __construct( |
|
46 | |||
47 | /** |
||
48 | * @param string $randomMode |
||
49 | * @param string $options |
||
50 | * @param string $errorMessage |
||
51 | * |
||
52 | * @throws PhpUnitViolationException |
||
53 | */ |
||
54 | 2 | private function execute($randomMode, $options, $errorMessage) |
|
67 | |||
68 | /** |
||
69 | * @param bool $randomMode |
||
70 | * @param string $options |
||
71 | * |
||
72 | * @return bool |
||
73 | */ |
||
74 | 2 | protected function executeTool($randomMode, $options) |
|
80 | |||
81 | /** |
||
82 | * @param CommandInterface|PhpUnitTool $command |
||
83 | */ |
||
84 | 2 | public function handle(CommandInterface $command) |
|
92 | } |
||
93 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: