| Total Complexity | 4 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class NewOutputEvent extends JobEvent |
||
| 10 | { |
||
| 11 | public const TYPE_STDOUT = 1; |
||
| 12 | public const TYPE_STDERR = 2; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $newOutput; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var int |
||
| 21 | */ |
||
| 22 | private $type; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param JobInterface $job |
||
| 26 | * @param string $newOutput |
||
| 27 | * @param int $type |
||
| 28 | */ |
||
| 29 | public function __construct(JobInterface $job, string $newOutput, int $type = self::TYPE_STDOUT) |
||
| 30 | { |
||
| 31 | parent::__construct($job); |
||
| 32 | |||
| 33 | $this->newOutput = $newOutput; |
||
| 34 | $this->type = $type; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | public function getNewOutput(): string |
||
| 41 | { |
||
| 42 | return $this->newOutput; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @param string $output |
||
| 47 | */ |
||
| 48 | public function setNewOutput(string $output): void |
||
| 49 | { |
||
| 50 | $this->newOutput = $output; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return int |
||
| 55 | */ |
||
| 56 | public function getType(): int |
||
| 59 | } |
||
| 60 | } |
||
| 61 |