1 | <?php |
||
24 | abstract class AbstractValidateCommand extends Command |
||
25 | { |
||
26 | /** |
||
27 | * @var ValidatorInterface |
||
28 | */ |
||
29 | private $validator; |
||
30 | |||
31 | /** |
||
32 | * Load JSON definitions |
||
33 | * |
||
34 | * @param InputInterface $input Command input |
||
35 | * @return SplFileInfo[] |
||
36 | */ |
||
37 | abstract protected function loadDefinitions(InputInterface $input); |
||
38 | |||
39 | /** |
||
40 | * Set validator |
||
41 | * |
||
42 | * @param ValidatorInterface $validator Definition validator |
||
43 | * @return void |
||
44 | */ |
||
45 | public function setValidator(ValidatorInterface $validator) |
||
49 | |||
50 | /** |
||
51 | * Executes command |
||
52 | * |
||
53 | * @param InputInterface $input input |
||
54 | * @param OutputInterface $output output |
||
55 | * @return int |
||
56 | */ |
||
57 | protected function execute(InputInterface $input, OutputInterface $output) |
||
74 | |||
75 | /** |
||
76 | * Validate JSON definition |
||
77 | * |
||
78 | * @param string $json JSON definition |
||
79 | * @return ValidationExceptionError[] |
||
80 | */ |
||
81 | protected function validateJsonDefinitionFile($json) |
||
89 | |||
90 | /** |
||
91 | * Convert errors to table rows |
||
92 | * |
||
93 | * @param OutputInterface $output Output |
||
94 | * @param SplFileInfo $fileInfo File info |
||
95 | * @param ValidationExceptionError[] $errors Errors |
||
96 | * @return void |
||
97 | */ |
||
98 | protected function outputErrors(OutputInterface $output, SplFileInfo $fileInfo, array $errors) |
||
117 | } |
||
118 |
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: