Completed
Push — master ( be53ba...d8ac27 )
by Jan Philipp
11s
created

ProcessCommand::isDeferred()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
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
     * @var bool
32
     */
33
    private $deferred;
34
35
    /**
36
     * @param string $shellCommand
37
     * @param int $lineNumber
38
     * @param bool $ignoreError
39
     * @param bool $tty
40
     * @param bool $deferred
41
     */
42
    public function __construct(
43
        string $shellCommand,
44
        int $lineNumber,
45
        bool $ignoreError,
46
        bool $tty,
47
        bool $deferred
48
    ) {
49
        $this->shellCommand = $shellCommand;
50
        $this->ignoreError = $ignoreError;
51
        $this->lineNumber = $lineNumber;
52
        $this->tty = $tty;
53
        $this->deferred = $deferred;
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getShellCommand(): string
60
    {
61
        return $this->shellCommand;
62
    }
63
64
    /**
65
     * @return boolean
66
     */
67
    public function isIgnoreError(): bool
68
    {
69
        return $this->ignoreError;
70
    }
71
72
    /**
73
     * @return int
74
     */
75
    public function getLineNumber(): int
76
    {
77
        return $this->lineNumber;
78
    }
79
80
    /**
81
     * @return bool
82
     */
83
    public function isTTy(): bool
84
    {
85
        return $this->tty;
86
    }
87
88
    /**
89
     * @return bool
90
     */
91
    public function isDeferred(): bool
92
    {
93
        return $this->deferred;
94
    }
95
}
96