Total Complexity | 3 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
8 | class DualOutput extends StreamOutput |
||
9 | { |
||
10 | /** @var string */ |
||
11 | protected $file; |
||
12 | |||
13 | /** @var ConsoleOutput */ |
||
14 | protected $consoleOuput; |
||
15 | |||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | protected function doWrite($message, $newline) |
||
20 | { |
||
21 | parent::doWrite($message, $newline); |
||
22 | |||
23 | $this->consoleOuput->write($message, $newline, true); |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Set console output from artisan console command. |
||
28 | * |
||
29 | * @param $consoleOutput |
||
30 | * |
||
31 | * @return $this |
||
32 | */ |
||
33 | public function setConsoleOutput($consoleOutput) |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Set the path to the file where the console output will be streamed. |
||
42 | * |
||
43 | * @param $file |
||
44 | * |
||
45 | * @return $this |
||
46 | */ |
||
47 | public function setFile($file) |
||
52 | } |
||
53 | } |
||
54 |