Completed
Push — master ( 3e3a37...ef36d2 )
by Biao
03:58
created
src/Console/Portal.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -131,9 +131,9 @@  discard block
 block discarded – undo
131 131
             if ($value === false) {
132 132
                 continue;
133 133
             }
134
-            $passOptionStr .= sprintf('--%s%s ', $key, is_bool($value) ? '' : ('=' . $value));
134
+            $passOptionStr .= sprintf('--%s%s ', $key, is_bool($value) ? '' : ('='.$value));
135 135
         }
136
-        $statusCode = $this->runArtisanCommand(trim('laravels config ' . $passOptionStr));
136
+        $statusCode = $this->runArtisanCommand(trim('laravels config '.$passOptionStr));
137 137
         if ($statusCode !== 0) {
138 138
             return $statusCode;
139 139
         }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         $config = $this->getConfig();
143 143
 
144 144
         if (!$config['server']['ignore_check_pid'] && file_exists($config['server']['swoole']['pid_file'])) {
145
-            $pid = (int)file_get_contents($config['server']['swoole']['pid_file']);
145
+            $pid = (int) file_get_contents($config['server']['swoole']['pid_file']);
146 146
             if ($pid > 0 && self::kill($pid, 0)) {
147 147
                 $this->warning(sprintf('Swoole[PID=%d] is already running.', $pid));
148 148
                 return 1;
@@ -188,8 +188,8 @@  discard block
 block discarded – undo
188 188
                 $basePath = dirname($pidFile);
189 189
                 $deleteFiles = [
190 190
                     $pidFile,
191
-                    $basePath . '/laravels-custom-processes.pid',
192
-                    $basePath . '/laravels-timer-process.pid',
191
+                    $basePath.'/laravels-custom-processes.pid',
192
+                    $basePath.'/laravels-timer-process.pid',
193 193
                 ];
194 194
                 foreach ($deleteFiles as $deleteFile) {
195 195
                     if (file_exists($deleteFile)) {
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
         }
240 240
 
241 241
         // Reload custom processes
242
-        $pidFile = dirname($pidFile) . '/laravels-custom-processes.pid';
242
+        $pidFile = dirname($pidFile).'/laravels-custom-processes.pid';
243 243
         if (file_exists($pidFile)) {
244
-            $pids = (array)explode("\n", trim(file_get_contents($pidFile)));
244
+            $pids = (array) explode("\n", trim(file_get_contents($pidFile)));
245 245
             unlink($pidFile);
246 246
             foreach ($pids as $pid) {
247 247
                 if (!$pid || !self::kill($pid, 0)) {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
         // Reload timer process
261 261
         if (!empty($config['server']['timer']['enable']) && !empty($config['server']['timer']['jobs'])) {
262
-            $pidFile = dirname($pidFile) . '/laravels-timer-process.pid';
262
+            $pidFile = dirname($pidFile).'/laravels-timer-process.pid';
263 263
             $pid = file_get_contents($pidFile);
264 264
             if (!$pid || !self::kill($pid, 0)) {
265 265
                 $this->error("Timer process[PID={$pid}] does not exist, or permission denied.");
@@ -283,9 +283,9 @@  discard block
 block discarded – undo
283 283
     public function loadApollo(array $options)
284 284
     {
285 285
         Client::putCommandOptionsToEnv($options);
286
-        $envFile = $this->basePath . '/.env';
286
+        $envFile = $this->basePath.'/.env';
287 287
         if (isset($options['env'])) {
288
-            $envFile .= '.' . $options['env'];
288
+            $envFile .= '.'.$options['env'];
289 289
         }
290 290
         Client::createFromCommandOptions($options)->pullAllAndSave($envFile);
291 291
     }
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 
312 312
     protected function getConfPath()
313 313
     {
314
-        return $this->basePath . '/storage/laravels.conf';
314
+        return $this->basePath.'/storage/laravels.conf';
315 315
     }
316 316
 
317 317
     public static function runCommand($cmd, $input = null)
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
     public static function kill($pid, $sig)
333 333
     {
334 334
         try {
335
-            return Process::kill((int)$pid, $sig);
335
+            return Process::kill((int) $pid, $sig);
336 336
         } catch (\Exception $e) {
337 337
             return false;
338 338
         }
Please login to merge, or discard this patch.