Passed
Push — master ( b79479...ba8306 )
by Kevin
08:05
created
html/user/server_status.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         $avg = round($app->info->avg, 2);
172 172
         $min = round($app->info->min, 2);
173 173
         $max = round($app->info->max, 2);
174
-        $x = $max?"$avg ($min - $max)":"---";
174
+        $x = $max ? "$avg ($min - $max)" : "---";
175 175
         $u = $app->info->users;
176 176
         echo "<tr>
177 177
             <td>$app->user_friendly_name</td>
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         $cmd = trim($cmd);
245 245
         $x = explode(" ", $cmd);
246 246
         $prog = $x[0];
247
-        $pidname = $prog . '.pid';
247
+        $pidname = $prog.'.pid';
248 248
     }
249 249
     $path = "../../pid_$host/$pidname";
250 250
     if (is_file($path)) {
@@ -285,12 +285,12 @@  discard block
 block discarded – undo
285 285
     }
286 286
     $master_host = $u["host"];
287 287
     if ($config->www_host) {
288
-        $web_host = trim((string) $config->www_host);
288
+        $web_host = trim((string)$config->www_host);
289 289
     } else {
290 290
         $web_host = $main_host;
291 291
     }
292 292
     if ($config->sched_host) {
293
-        $sched_host = trim((string) $config->sched_host);
293
+        $sched_host = trim((string)$config->sched_host);
294 294
     } else {
295 295
         $sched_host = $main_host;
296 296
     }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
     // the upload and download servers are sort of daemons too
302 302
     //
303
-    $url = trim((string) $config->download_url);
303
+    $url = trim((string)$config->download_url);
304 304
     $u = parse_url($url);
305 305
     $h = $u["host"];
306 306
     if ($h == $master_host) {
@@ -312,14 +312,14 @@  discard block
 block discarded – undo
312 312
     } else {
313 313
         $have_remote = true;
314 314
     }
315
-    $url = trim((string) $config->upload_url);
315
+    $url = trim((string)$config->upload_url);
316 316
     $u = parse_url($url);
317 317
     $h = $u["host"];
318 318
     if ($h == $master_host) {
319 319
         $y = new StdClass;
320 320
         $y->cmd = "Upload server";
321 321
         $y->host = $h;
322
-        $y->status = !file_exists("../../stop_upload");;
322
+        $y->status = !file_exists("../../stop_upload"); ;
323 323
         $local_daemons[] = $y;
324 324
     } else {
325 325
         $have_remote = true;
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
         $y = new StdClass;
332 332
         $y->cmd = "Scheduler";
333 333
         $y->host = $sched_host;
334
-        $y->status = !file_exists("../../stop_sched");;
334
+        $y->status = !file_exists("../../stop_sched"); ;
335 335
         $local_daemons[] = $y;
336 336
     } else {
337 337
         $have_remote = true;
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
             $disabled_daemons[] = $x;
348 348
             continue;
349 349
         }
350
-        $host = $d->host?(string)$d->host:$main_host;
350
+        $host = $d->host ? (string)$d->host : $main_host;
351 351
         if ($host != $web_host) {
352 352
             $have_remote = true;
353 353
             continue;
Please login to merge, or discard this patch.
html/user/get_project_config.php 3 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@
 block discarded – undo
28 28
 //
29 29
 function show_platforms() {
30 30
     $xmlFragment = unserialize(get_cached_data(3600, "project_config_platform_xml"));
31
-    if ($xmlFragment==false){
31
+    if ($xmlFragment==false) {
32 32
         $platforms = BoincDB::get()->enum_fields("platform, DBNAME.app_version, DBNAME.app", "BoincPlatform", "platform.name, platform.user_friendly_name, plan_class", "app_version.platformid = platform.id and app_version.appid = app.id and app_version.deprecated=0 and app.deprecated=0 group by platform.name, plan_class", "");
33 33
         $xmlFragment = "    <platforms>";
34
-        foreach ($platforms as $platform){
34
+        foreach ($platforms as $platform) {
35 35
             $xmlFragment .= "
36 36
             <platform>
37 37
                 <platform_name>$platform->name</platform_name>
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
 }
87 87
 
88 88
 if ($disable_account_creation || defined('INVITE_CODES')) {
89
-	echo "    <account_creation_disabled/>\n";
89
+    echo "    <account_creation_disabled/>\n";
90 90
 }
91 91
 
92 92
 if (defined('INVITE_CODES')) {
93
-	echo "    <invite_code_required/>\n";
93
+    echo "    <invite_code_required/>\n";
94 94
 }
95 95
 
96 96
 echo "    <min_passwd_length>$min_passwd_length</min_passwd_length>\n";
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 // the terms_of_use.txt file in the project base directory.
114 114
 //
115 115
 if (defined('TERMSOFUSE_FILE')) {
116
-  $tou_file = TERMSOFUSE_FILE;
116
+    $tou_file = TERMSOFUSE_FILE;
117 117
 } else {
118
-  $tou_file =  "../../terms_of_use.txt";
118
+    $tou_file =  "../../terms_of_use.txt";
119 119
 }
120 120
 if (file_exists($tou_file)) {
121 121
     $terms_of_use = trim(file_get_contents($tou_file));
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 //
31 31
 function show_platforms() {
32 32
     $xmlFragment = unserialize(get_cached_data(3600, "project_config_platform_xml"));
33
-    if ($xmlFragment==false){
33
+    if ($xmlFragment == false) {
34 34
         $platforms = BoincDB::get()->enum_fields("platform, DBNAME.app_version, DBNAME.app", "BoincPlatform", "platform.name, platform.user_friendly_name, plan_class", "app_version.platformid = platform.id and app_version.appid = app.id and app_version.deprecated=0 and app.deprecated=0 group by platform.name, plan_class", "");
35 35
         $xmlFragment = "    <platforms>";
36
-        foreach ($platforms as $platform){
36
+        foreach ($platforms as $platform) {
37 37
             $xmlFragment .= "
38 38
             <platform>
39 39
                 <platform_name>$platform->name</platform_name>
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 if (defined('TERMSOFUSE_FILE')) {
116 116
   $tou_file = TERMSOFUSE_FILE;
117 117
 } else {
118
-  $tou_file =  "../../terms_of_use.txt";
118
+  $tou_file = "../../terms_of_use.txt";
119 119
 }
120 120
 if (file_exists($tou_file)) {
121 121
     $terms_of_use = trim(file_get_contents($tou_file));
Please login to merge, or discard this patch.