Passed
Push — master ( 13e0c0...03d969 )
by Vitalii
09:26 queued 14s
created
html/inc/kw_prefs.inc 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,14 +31,14 @@
 block discarded – undo
31 31
     if (file_exists($path)) {
32 32
         $x = file($path);
33 33
         $yes = explode(' ', trim($x[0]));
34
-        if ($yes[0]=='') $yes=[];
34
+        if ($yes[0] == '') $yes = [];
35 35
         $yes = array_map('intval', $yes);
36 36
         $no = explode(' ', trim($x[1]));
37
-        if ($no[0]=='') $no=[];
37
+        if ($no[0] == '') $no = [];
38 38
         $no = array_map('intval', $no);
39 39
         return [$yes, $no];
40 40
     } else {
41
-        return [[],[]];
41
+        return [[], []];
42 42
     }
43 43
 }
44 44
 
Please login to merge, or discard this patch.
html/inc/recaptchalib.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
 function boinc_recaptcha_get_html($publickey) {
34 34
     if ($publickey) {
35
-        return '<div class="g-recaptcha" data-sitekey="' . $publickey . '"></div>';
35
+        return '<div class="g-recaptcha" data-sitekey="'.$publickey.'"></div>';
36 36
     } else {
37 37
         return '';
38 38
     }
Please login to merge, or discard this patch.
html/inc/submit_util.inc 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     foreach ($res_in_prog as $res) {
180 180
         $wus_in_prog[$res->workunitid] = true;
181 181
     }
182
-    unset($res_in_progress);    // does this do anything?
182
+    unset($res_in_progress); // does this do anything?
183 183
 
184 184
     $fp_total = 0;
185 185
     $fp_done = 0;
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
 // get the total size of output files of a batch
353 353
 //
354 354
 function batch_output_file_size($batchid) {
355
-    $batch_td_size=0;
355
+    $batch_td_size = 0;
356 356
     $wus = BoincWorkunit::enum_fields(
357 357
         'canonical_resultid',
358 358
         "batch=$batchid"
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 }
386 386
 
387 387
 function boinc_get_wu_output_files_url($user, $wu_id) {
388
-    $auth_str =  md5($user->authenticator.$wu_id);
388
+    $auth_str = md5($user->authenticator.$wu_id);
389 389
     return "get_output.php?cmd=workunit_files&wu_id=$wu_id&auth_str=$auth_str";
390 390
 }
391 391
 
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
     if (!file_exists($path)) return null;
420 420
     $x = file_get_contents($path);
421 421
     $n = sscanf($x, "%s %d", $md5, $size);
422
-    if ($n != 2 || strlen($md5)!=32) {
422
+    if ($n != 2 || strlen($md5) != 32) {
423 423
         return null;
424 424
     }
425 425
     return [$md5, $size];
Please login to merge, or discard this patch.
html/user/buda_submit.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 //
86 86
 function unzip_batch_file($user, $batch_file) {
87 87
     @mkdir("../../buda_batches");
88
-    for ($i=0; $i<1000; $i++) {
88
+    for ($i = 0; $i < 1000; $i++) {
89 89
         $batch_dir = "../../buda_batches/$i";
90 90
         $batch_dir_name = $i;
91 91
         $ret = @mkdir($batch_dir);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         }
137 137
         $job_files = [];
138 138
         $cmdline = '';
139
-        foreach(scandir("$batch_dir/$fname") as $f2) {
139
+        foreach (scandir("$batch_dir/$fname") as $f2) {
140 140
             if ($f2[0] == '.') continue;
141 141
             if ($f2 == 'cmdline') {
142 142
                 $cmdline = trim(file_get_contents("$batch_dir/$fname/cmdline"));
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 function stage_input_files($batch_dir, $batch_desc, $batch_id) {
187 187
     $n = count($batch_desc->shared_files);
188 188
     $batch_desc->shared_files_phys_names = [];
189
-    for ($i=0; $i<$n; $i++) {
189
+    for ($i = 0; $i < $n; $i++) {
190 190
         $path = sprintf('%s/%s', $batch_dir, $batch_desc->shared_files[$i]);
191 191
         [$md5, $size] = $batch_desc->shared_file_infos[$i];
192 192
         $phys_name = sprintf('batch_%d_%s', $batch_id, $md5);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     foreach ($batch_desc->jobs as $job) {
197 197
         $n = count($batch_desc->unshared_files);
198 198
         $job->phys_names = [];
199
-        for ($i=0; $i<$n; $i++) {
199
+        for ($i = 0; $i < $n; $i++) {
200 200
             $path = sprintf('%s/%s/%s',
201 201
                 $batch_dir, $job->dir, $batch_desc->unshared_files[$i]
202 202
             );
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
     }
246 246
     $wrapper_cmdline = sprintf('"--dockerfile %s %s %s"',
247 247
         $variant_desc->dockerfile,
248
-        $wrapper_verbose?'--verbose':'',
248
+        $wrapper_verbose ? '--verbose' : '',
249 249
         $cmdline
250 250
     );
251 251
     $cmd = sprintf(
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
     $max_runtime_days = (double)$max_runtime_days;
295 295
     if ($max_runtime_days <= 0) error_page('bad runtime limit');
296 296
     if ($max_runtime_days > 100) error_page('bad runtime limit');
297
-    $max_fpops = $max_runtime_days * 4.3e9 * 86400;
297
+    $max_fpops = $max_runtime_days*4.3e9*86400;
298 298
 
299 299
     $exp_runtime_days = get_str('exp_runtime_days');
300 300
     if (!is_numeric($exp_runtime_days)) error_page('bad expected runtime');
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
     if ($exp_runtime_days > $max_runtime_days) {
305 305
         error_page('exp must be < max runtime');
306 306
     }
307
-    $exp_fpops = $exp_runtime_days * 4.3e9 * 86400;
307
+    $exp_fpops = $exp_runtime_days*4.3e9*86400;
308 308
 
309 309
     $app_desc = get_buda_desc($app);
310 310
 
Please login to merge, or discard this patch.