Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.0185 |
Changes | 0 |
1 | <?php |
||
46 | 2 | public function create($uuid) |
|
47 | { |
||
48 | 2 | $command = implode(' ', [$this->consolePath, 'task:execute', $uuid, '--env=' . $this->environment]); |
|
49 | |||
50 | 2 | if (method_exists(Process::class, 'fromShellCommandline')) { |
|
51 | 2 | $process = Process::fromShellCommandline($command); |
|
52 | } else { |
||
53 | $process = new Process($command); |
||
|
|||
54 | } |
||
55 | |||
56 | 2 | return $process->setTimeout($this->processTimeout); |
|
57 | } |
||
58 | } |
||
59 |
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: