| Conditions | 3 |
| Paths | 2 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function handle() |
||
| 41 | { |
||
| 42 | // $this->line(' Installing backpack/generators'); |
||
| 43 | $command = 'php -v && composer show | grep "backpack\|laravel/framework" && mysql --version'; |
||
| 44 | $process = new Process($command, null, null, null, 60, null); |
||
| 45 | $process->run(function ($type, $buffer) { |
||
| 46 | if (Process::ERR === $type) { |
||
| 47 | $this->line($buffer); |
||
| 48 | } else { |
||
| 49 | $this->line($buffer); |
||
| 50 | } |
||
| 51 | }); |
||
| 52 | |||
| 53 | // executes after the command finishes |
||
| 54 | if (!$process->isSuccessful()) { |
||
| 55 | throw new ProcessFailedException($process); |
||
| 56 | } |
||
| 57 | } |
||
| 58 | } |
||
| 59 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.