Passed
Pull Request — master (#6305)
by David
20:51 queued 10:57
created
html/user/job_fpops.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             $host = BoincHost::lookup_id($res->hostid);
36 36
             $hosts[$res->hostid] = $host;
37 37
         }
38
-        $fpops = $res->cpu_time * $host->p_fpops;
38
+        $fpops = $res->cpu_time*$host->p_fpops;
39 39
         $samples[] = $res->cpu_time;
40 40
         //$fpops /= 1e9;
41 41
         //echo "$res->cpu_time $fpops\n";
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 }
46 46
 
47 47
 function show($samples) {
48
-    $x = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
48
+    $x = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
49 49
     foreach ($samples as $s) {
50 50
         $x[(int)log10($s)] += 1;
51 51
     }
52
-    for ($i=0; $i<16; $i++) {
52
+    for ($i = 0; $i < 16; $i++) {
53 53
         echo sprintf("%d: %d\n", $i, $x[$i]);
54 54
     }
55 55
 }
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
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 //
85 85
 function unzip_batch_file($user, $batch_file) {
86 86
     @mkdir("../../buda_batches");
87
-    for ($i=0; $i<1000; $i++) {
87
+    for ($i = 0; $i < 1000; $i++) {
88 88
         $batch_dir = "../../buda_batches/$i";
89 89
         $batch_dir_name = $i;
90 90
         $ret = @mkdir($batch_dir);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         }
136 136
         $job_files = [];
137 137
         $cmdline = '';
138
-        foreach(scandir("$batch_dir/$fname") as $f2) {
138
+        foreach (scandir("$batch_dir/$fname") as $f2) {
139 139
             if ($f2[0] == '.') continue;
140 140
             if ($f2 == 'cmdline') {
141 141
                 $cmdline = trim(file_get_contents("$batch_dir/$fname/cmdline"));
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 function stage_input_files($batch_dir, $batch_desc, $batch_id) {
186 186
     $n = count($batch_desc->shared_files);
187 187
     $batch_desc->shared_files_phys_names = [];
188
-    for ($i=0; $i<$n; $i++) {
188
+    for ($i = 0; $i < $n; $i++) {
189 189
         $path = sprintf('%s/%s', $batch_dir, $batch_desc->shared_files[$i]);
190 190
         [$md5, $size] = $batch_desc->shared_file_infos[$i];
191 191
         $phys_name = sprintf('batch_%d_%s', $batch_id, $md5);
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     foreach ($batch_desc->jobs as $job) {
196 196
         $n = count($batch_desc->unshared_files);
197 197
         $job->phys_names = [];
198
-        for ($i=0; $i<$n; $i++) {
198
+        for ($i = 0; $i < $n; $i++) {
199 199
             $path = sprintf('%s/%s/%s',
200 200
                 $batch_dir, $job->dir, $batch_desc->unshared_files[$i]
201 201
             );
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     }
244 244
     $wrapper_cmdline = sprintf('"--dockerfile %s %s %s"',
245 245
         $variant_desc->dockerfile,
246
-        $wrapper_verbose?'--verbose':'',
246
+        $wrapper_verbose ? '--verbose' : '',
247 247
         $cmdline
248 248
     );
249 249
     $cmd = sprintf(
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     $max_runtime_days = (double)$max_runtime_days;
290 290
     if ($max_runtime_days <= 0) error_page('bad runtime limit');
291 291
     if ($max_runtime_days > 100) error_page('bad runtime limit');
292
-    $max_fpops = $max_runtime_days * 3.5e9 * 86400;
292
+    $max_fpops = $max_runtime_days*3.5e9*86400;
293 293
 
294 294
     $exp_runtime_days = get_str('exp_runtime_days');
295 295
     if (!is_numeric($exp_runtime_days)) error_page('bad expected runtime');
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
     if ($exp_runtime_days > $max_runtime_days) {
300 300
         error_page('exp must be < max runtime');
301 301
     }
302
-    $exp_fpops = $exp_runtime_days * 3.5e9 * 86400;
302
+    $exp_fpops = $exp_runtime_days*3.5e9*86400;
303 303
 
304 304
     $app_desc = get_buda_desc($app);
305 305
 
Please login to merge, or discard this patch.