Completed
Pull Request — master (#111)
by Jan Philipp
04:06
created

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