@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | protected function handleClearOption() |
| 31 | 31 | { |
| 32 | - if (! $this->option('clear')) { |
|
| 32 | + if (!$this->option('clear')) { |
|
| 33 | 33 | return; |
| 34 | 34 | } |
| 35 | 35 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | Process::fromShellCommandline($this->getTailCommand(), $logDirectory) |
| 44 | 44 | ->setTty(true) |
| 45 | 45 | ->setTimeout(null) |
| 46 | - ->run(function ($type, $line) { |
|
| 46 | + ->run(function($type, $line) { |
|
| 47 | 47 | $this->handleClearOption(); |
| 48 | 48 | |
| 49 | 49 | $this->output->write($line); |
@@ -55,8 +55,8 @@ discard block |
||
| 55 | 55 | $environmentConfig = $this->getEnvironmentConfiguration($environment); |
| 56 | 56 | |
| 57 | 57 | Ssh::create($environmentConfig['user'], $environmentConfig['host']) |
| 58 | - ->configureProcess(fn (Process $process) => $process->setTty(true)) |
|
| 59 | - ->onOutput(function ($type, $line) { |
|
| 58 | + ->configureProcess(fn(Process $process) => $process->setTty(true)) |
|
| 59 | + ->onOutput(function($type, $line) { |
|
| 60 | 60 | $this->handleClearOption(); |
| 61 | 61 | |
| 62 | 62 | $this->output->write($line); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | { |
| 72 | 72 | $config = config('tail'); |
| 73 | 73 | |
| 74 | - if (! isset($config[$environment])) { |
|
| 74 | + if (!isset($config[$environment])) { |
|
| 75 | 75 | throw new Exception("No configuration set for environment `{$environment}`. Make sure this environment is specified in the `tail` config file!"); |
| 76 | 76 | } |
| 77 | 77 | |
@@ -80,8 +80,8 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | public function getTailCommand(): string |
| 82 | 82 | { |
| 83 | - $grep = ($this->option('grep')) ? ' | grep "' . $this->option('grep').'"' : ''; |
|
| 83 | + $grep = ($this->option('grep')) ? ' | grep "'.$this->option('grep').'"' : ''; |
|
| 84 | 84 | |
| 85 | - return 'tail -f -n '.$this->option('lines').' "`ls -t | head -1`"' . $grep; |
|
| 85 | + return 'tail -f -n '.$this->option('lines').' "`ls -t | head -1`"'.$grep; |
|
| 86 | 86 | } |
| 87 | 87 | } |