Completed
Push — master ( 0ced52...d99b90 )
by Markus
03:30
created

Process::isLocked()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Jellyfish\ProcessSymfony;
4
5
use Jellyfish\Process\ProcessInterface;
6
use Symfony\Component\Process\Process as SymfonyProcess;
7
8
class Process implements ProcessInterface
9
{
10
    /**
11
     * @var array
12
     */
13
    protected $command;
14
15
    /**
16
     * @var \Symfony\Component\Process\Process
17
     */
18
    protected $process;
19
20
    /**
21
     * @param array $command
22
     */
23
    public function __construct(array $command)
24
    {
25
        $this->command = $command;
26
        $preparedCommand = \implode(' ', $this->command);
27
28
        $this->process = new SymfonyProcess($preparedCommand);
29
    }
30
31
    /**
32
     * @return \Jellyfish\Process\ProcessInterface
33
     */
34
    public function start(): ProcessInterface
35
    {
36
        $this->process->start();
37
38
        return $this;
39
    }
40
41
    /**
42
     * @return array
43
     */
44
    public function getCommand(): array
45
    {
46
        return $this->command;
47
    }
48
}
49