SilentProcessRunner::followsUpWith()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace Dock\IO;
4
5
use Symfony\Component\Process\Process;
6
7
class SilentProcessRunner implements ProcessRunner
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function run($command, $mustSucceed = true)
13
    {
14
        $process = new Process($command);
15
16
        if ($mustSucceed) {
17
            $process->setTimeout(null);
18
19
            return $process->mustRun();
20
        }
21
22
        $process->run();
23
24
        return $process;
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function followsUpWith($command, array $arguments = [])
31
    {
32
        pcntl_exec($command, $arguments);
33
    }
34
}
35