Completed
Push — master ( 9d2c7e...85264a )
by Jan Philipp
11s
created

ProcessCommand::getShellCommand()   A

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 0
1
<?php declare(strict_types=1);
2
3
4
namespace Shopware\Psh\ScriptRuntime;
5
6
/**
7
 * A single command of a script
8
 */
9
class ProcessCommand implements Command
10
{
11
    /**
12
     * @var string
13
     */
14
    private $shellCommand;
15
16
    /**
17
     * @var bool
18
     */
19
    private $ignoreError;
20
21
    /**
22
     * @var int
23
     */
24
    private $lineNumber;
25
26
    /**
27
     * @var bool
28
     */
29
    private $tty;
30
31
    /**
32
     * Command constructor.
33
     * @param string $shellCommand
34
     * @param int $lineNumber
35
     * @param bool $ignoreError
36
     * @param bool $tty
37
     */
38
    public function __construct(
39
        string $shellCommand,
40
        int $lineNumber,
41
        bool $ignoreError,
42
        bool $tty
43
    ) {
44
        $this->shellCommand = $shellCommand;
45
        $this->ignoreError = $ignoreError;
46
        $this->lineNumber = $lineNumber;
47
        $this->tty = $tty;
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function getShellCommand(): string
54
    {
55
        return $this->shellCommand;
56
    }
57
58
    /**
59
     * @return boolean
60
     */
61
    public function isIgnoreError(): bool
62
    {
63
        return $this->ignoreError;
64
    }
65
66
    /**
67
     * @return int
68
     */
69
    public function getLineNumber(): int
70
    {
71
        return $this->lineNumber;
72
    }
73
74
    /**
75
     * @return bool
76
     */
77
    public function isTTy(): bool
78
    {
79
        return $this->tty;
80
    }
81
}
82