whiteoctober /
WhiteOctoberPagerfantaBundle
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | #!/usr/bin/env php |
||
| 2 | <?php |
||
| 3 | |||
| 4 | require(__DIR__.'/vendor/autoload.php'); |
||
| 5 | |||
| 6 | use Symfony\Component\Process\Process; |
||
| 7 | |||
| 8 | $commands = array( |
||
| 9 | 'php vendor/bin/phpunit', |
||
| 10 | 'php vendor/bin/phpunit -c TestsProject/app/', |
||
| 11 | ); |
||
| 12 | $fail = false; |
||
| 13 | |||
| 14 | foreach ($commands as $command) { |
||
| 15 | $process = new Process($command); |
||
|
0 ignored issues
–
show
|
|||
| 16 | $process->run(function ($type, $data) { |
||
| 17 | if ('out' === $type) { |
||
| 18 | echo $data; |
||
| 19 | } |
||
| 20 | }); |
||
| 21 | if (0 !== $process->getExitCode()) { |
||
| 22 | $fail = true; |
||
| 23 | } |
||
| 24 | } |
||
| 25 | |||
| 26 | exit($fail ? 1 : 0); |
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: