Passed
Pull Request — master (#5726)
by David
08:46
created
html/user/server_status.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             $avg = round($app->info->avg, 2);
181 181
             $min = round($app->info->min, 2);
182 182
             $max = round($app->info->max, 2);
183
-            $x = $max?"$avg ($min - $max)":"---";
183
+            $x = $max ? "$avg ($min - $max)" : "---";
184 184
             $u = $app->info->users;
185 185
         } else {
186 186
             $x = '---';
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         $cmd = trim($cmd);
276 276
         $x = explode(" ", $cmd);
277 277
         $prog = $x[0];
278
-        $pidname = $prog . '.pid';
278
+        $pidname = $prog.'.pid';
279 279
     }
280 280
     $path = "../../pid_$host/$pidname";
281 281
     if (is_file($path)) {
@@ -316,12 +316,12 @@  discard block
 block discarded – undo
316 316
     }
317 317
     $master_host = $u["host"];
318 318
     if ($config->www_host) {
319
-        $web_host = trim((string) $config->www_host);
319
+        $web_host = trim((string)$config->www_host);
320 320
     } else {
321 321
         $web_host = $main_host;
322 322
     }
323 323
     if ($config->sched_host) {
324
-        $sched_host = trim((string) $config->sched_host);
324
+        $sched_host = trim((string)$config->sched_host);
325 325
     } else {
326 326
         $sched_host = $main_host;
327 327
     }
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 
332 332
     // the upload and download servers are sort of daemons too
333 333
     //
334
-    $url = trim((string) $config->download_url);
334
+    $url = trim((string)$config->download_url);
335 335
     $u = parse_url($url);
336 336
     $h = $u["host"];
337 337
     if ($h == $master_host) {
@@ -343,14 +343,14 @@  discard block
 block discarded – undo
343 343
     } else {
344 344
         $have_remote = true;
345 345
     }
346
-    $url = trim((string) $config->upload_url);
346
+    $url = trim((string)$config->upload_url);
347 347
     $u = parse_url($url);
348 348
     $h = $u["host"];
349 349
     if ($h == $master_host) {
350 350
         $y = new StdClass;
351 351
         $y->cmd = "Upload server";
352 352
         $y->host = $h;
353
-        $y->status = !file_exists("../../stop_upload");;
353
+        $y->status = !file_exists("../../stop_upload"); ;
354 354
         $local_daemons[] = $y;
355 355
     } else {
356 356
         $have_remote = true;
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
     $y = new StdClass;
362 362
     $y->cmd = "Scheduler";
363 363
     $y->host = $sched_host;
364
-    $y->status = !file_exists("../../stop_sched");;
364
+    $y->status = !file_exists("../../stop_sched"); ;
365 365
     $local_daemons[] = $y;
366 366
 
367 367
     foreach ($daemons->daemon as $d) {
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
             $disabled_daemons[] = $x;
375 375
             continue;
376 376
         }
377
-        $host = $d->host?(string)$d->host:$main_host;
377
+        $host = $d->host ? (string)$d->host : $main_host;
378 378
         if ($host != $web_host) {
379 379
             $have_remote = true;
380 380
             continue;
Please login to merge, or discard this patch.