| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function command($command, array $parameters = []) |
||
| 23 | { |
||
| 24 | $this->rawCommand = $command; |
||
| 25 | |||
| 26 | if (class_exists($command)) { |
||
| 27 | $command = Container::getInstance()->make($command)->getName(); |
||
| 28 | } |
||
| 29 | |||
| 30 | $binary = ProcessUtils::escapeArgument((new PhpExecutableFinder())->find(false)); |
||
| 31 | |||
| 32 | $artisan = defined('ARTISAN_BINARY') ? ProcessUtils::escapeArgument(ARTISAN_BINARY) : 'artisan'; |
||
| 33 | |||
| 34 | return $this->exec("{$binary} {$artisan} {$command}", $parameters); |
||
| 35 | } |
||
| 36 | |||
| 56 |