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