Completed
Push — master ( 1ece6c...656998 )
by Jan Philipp
13s queued 11s
created

DeferredProcessCommand::isTTy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
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 View Code Duplication
class DeferredProcessCommand implements ProcessCommand, ParsableCommand
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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
     * @param string $shellCommand
33
     * @param int $lineNumber
34
     * @param bool $ignoreError
35
     * @param bool $tty
36
     */
37
    public function __construct(
38
        string $shellCommand,
39
        int $lineNumber,
40
        bool $ignoreError,
41
        bool $tty
42
    ) {
43
        $this->shellCommand = $shellCommand;
44
        $this->ignoreError = $ignoreError;
45
        $this->lineNumber = $lineNumber;
46
        $this->tty = $tty;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getShellCommand(): string
53
    {
54
        return $this->shellCommand;
55
    }
56
57
    /**
58
     * @return boolean
59
     */
60
    public function isIgnoreError(): bool
61
    {
62
        return $this->ignoreError;
63
    }
64
65
    /**
66
     * @return int
67
     */
68
    public function getLineNumber(): int
69
    {
70
        return $this->lineNumber;
71
    }
72
73
    /**
74
     * @return bool
75
     */
76
    public function isTTy(): bool
77
    {
78
        return $this->tty;
79
    }
80
}
81