| 1 | <?php |
||
| 7 | class CommandTasks |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var \Illuminate\Console\OutputStyle |
||
| 11 | */ |
||
| 12 | protected $output; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | protected $results = []; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Set command output. |
||
| 21 | * |
||
| 22 | * @param \Illuminate\Console\OutputStyle $output |
||
| 23 | * @return self |
||
| 24 | */ |
||
| 25 | public function setOutput(OutputStyle $output) : self |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Add task with result to the stack. |
||
| 34 | * |
||
| 35 | * @param string $name |
||
| 36 | * @param bool $result |
||
| 37 | * @return self |
||
| 38 | */ |
||
| 39 | public function addTask(string $name, bool $result) : self |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Send results to the command output. |
||
| 48 | * |
||
| 49 | * @return void |
||
| 50 | */ |
||
| 51 | public function outputResults() : void |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Get the results of all tasks. |
||
| 63 | * |
||
| 64 | * @return array |
||
| 65 | */ |
||
| 66 | public function getResults() : array |
||
| 70 | } |
||
| 71 |