@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | public function boot() |
13 | 13 | { |
14 | 14 | $this->publishes([ |
15 | - __DIR__.'/../config/consolify.php' => config_path('consolify.php'), |
|
15 | + __DIR__ . '/../config/consolify.php' => config_path('consolify.php'), |
|
16 | 16 | ]); |
17 | 17 | } |
18 | 18 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function register() |
23 | 23 | { |
24 | - $this->mergeConfigFrom(__DIR__.'/../config/consolify.php', 'consolify'); |
|
24 | + $this->mergeConfigFrom(__DIR__ . '/../config/consolify.php', 'consolify'); |
|
25 | 25 | |
26 | 26 | // ... |
27 | 27 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | protected function handeException(Exception $e) |
83 | 83 | { |
84 | - $this->error(TraceReserved::FAILED." {$e->getMessage()}"); |
|
84 | + $this->error(TraceReserved::FAILED . " {$e->getMessage()}"); |
|
85 | 85 | |
86 | 86 | app()->log->error($e); |
87 | 87 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | protected function getNotParsedArgument(InputInterface $input, $index) |
100 | 100 | { |
101 | - return explode(' ', (string) $input)[$index]; |
|
101 | + return explode(' ', (string)$input)[$index]; |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -110,6 +110,6 @@ discard block |
||
110 | 110 | */ |
111 | 111 | protected function isVerbose(InputInterface $input) |
112 | 112 | { |
113 | - return (bool) substr_count((string) $input, '-vvv'); |
|
113 | + return (bool)substr_count((string)$input, '-vvv'); |
|
114 | 114 | } |
115 | 115 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | { |
9 | 9 | public static function newProgressInstance($max, $uid, OutputInterface $output) |
10 | 10 | { |
11 | - if (! class_exists($progressClass = config('consolify.progress.concrete_class'))) { |
|
11 | + if (!class_exists($progressClass = config('consolify.progress.concrete_class'))) { |
|
12 | 12 | throw new \LogicException("Cannot find progress class [$progressClass]"); |
13 | 13 | } |
14 | 14 | |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | /** @return Progress */ |
26 | 26 | public static function progressFor($uid) |
27 | 27 | { |
28 | - if (! class_exists($progressClass = config('consolify.progress.concrete_class'))) { |
|
28 | + if (!class_exists($progressClass = config('consolify.progress.concrete_class'))) { |
|
29 | 29 | throw new \LogicException("Cannot find progress class [$progressClass]"); |
30 | 30 | } |
31 | 31 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | public function get($from = null, $truncate = true) |
40 | 40 | { |
41 | - if (! $file = $this->getFile()) { |
|
41 | + if (!$file = $this->getFile()) { |
|
42 | 42 | throw new TraceException('Cannot find file to trace.'); |
43 | 43 | } |
44 | 44 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | public function getFile() |
49 | 49 | { |
50 | - if (! file_exists($file = $this->uidToFile($this->uid))) { |
|
50 | + if (!file_exists($file = $this->uidToFile($this->uid))) { |
|
51 | 51 | return; |
52 | 52 | } |
53 | 53 | |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | // If there is new content |
71 | 71 | if ($len > $last_position) { |
72 | 72 | $f = fopen($file, 'rb'); |
73 | - if (! $f) { |
|
73 | + if (!$f) { |
|
74 | 74 | throw new \LogicException("Cannot read file. [$file]"); |
75 | 75 | } |
76 | 76 | |
77 | 77 | $lines = []; |
78 | 78 | fseek($f, $last_position); |
79 | - while (! feof($f)) { |
|
79 | + while (!feof($f)) { |
|
80 | 80 | $lines = array_merge( |
81 | 81 | $lines, |
82 | 82 | explode("\n", fread($f, 4096)) |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | public function addCommandLine($command) |
124 | 124 | { |
125 | - file_put_contents($this->getFile(), "[{$command}]".PHP_EOL, FILE_APPEND); |
|
125 | + file_put_contents($this->getFile(), "[{$command}]" . PHP_EOL, FILE_APPEND); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | public function fileToUid($fullPath) |
158 | 158 | { |
159 | 159 | return $this->relativeFileToUid( |
160 | - str_replace($this->basePath.'/', '', $fullPath) |
|
160 | + str_replace($this->basePath . '/', '', $fullPath) |
|
161 | 161 | ); |
162 | 162 | } |
163 | 163 |