Code Duplication    Length = 66-66 lines in 2 locations

src/ScriptRuntime/DeferredProcessCommand.php 1 location

@@ 8-73 (lines=66) @@
5
/**
6
 * A single command of a script
7
 */
8
class DeferredProcessCommand implements ProcessCommand, ParsableCommand
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

src/ScriptRuntime/SynchronusProcessCommand.php 1 location

@@ 8-73 (lines=66) @@
5
/**
6
 * A single command of a script
7
 */
8
class SynchronusProcessCommand implements ProcessCommand, ParsableCommand
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