Completed
Push — master ( 19bf14...3ae017 )
by
unknown
22:36
created

tests.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

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
$command is of type string, but the function expects a array.

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:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
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);