@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | if ($owner) { |
542 | 542 | row2('submitter', $owner->name); |
543 | 543 | } |
544 | - row2("application", $app?$app->name:'---'); |
|
544 | + row2("application", $app ? $app->name : '---'); |
|
545 | 545 | row2("state", batch_state_string($batch->state)); |
546 | 546 | //row2("# jobs", $batch->njobs); |
547 | 547 | //row2("# error jobs", $batch->nerror_jobs); |
@@ -601,9 +601,9 @@ discard block |
||
601 | 601 | 'Credit' |
602 | 602 | ]; |
603 | 603 | row_heading_array($x); |
604 | - foreach($wus as $wu) { |
|
604 | + foreach ($wus as $wu) { |
|
605 | 605 | $y = ''; |
606 | - switch($wu->status) { |
|
606 | + switch ($wu->status) { |
|
607 | 607 | case WU_SUCCESS: |
608 | 608 | $resultid = $wu->canonical_resultid; |
609 | 609 | $y = '<font color="green">completed</font>'; |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | $x = [ |
622 | 622 | "<a href=submit.php?action=query_job&wuid=$wu->id>$wu->name</a>", |
623 | 623 | $y, |
624 | - $wu->canonical_credit?number_format($wu->canonical_credit, 2):'---' |
|
624 | + $wu->canonical_credit ?number_format($wu->canonical_credit, 2) : '---' |
|
625 | 625 | ]; |
626 | 626 | row_array($x); |
627 | 627 | } |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | $results = BoincResult::enum("workunitid=$wuid"); |
681 | 681 | $upload_dir = parse_config(get_config(), "<upload_dir>"); |
682 | 682 | $fanout = parse_config(get_config(), "<uldl_dir_fanout>"); |
683 | - foreach($results as $result) { |
|
683 | + foreach ($results as $result) { |
|
684 | 684 | $x = [ |
685 | 685 | "<a href=result.php?resultid=$result->id>$result->id</a>", |
686 | 686 | state_string($result) |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | if ($result->server_state == RESULT_SERVER_STATE_OVER) { |
690 | 690 | $phys_names = get_outfile_phys_names($result); |
691 | 691 | $log_names = get_outfile_log_names($result); |
692 | - for ($i=0; $i<count($phys_names); $i++) { |
|
692 | + for ($i = 0; $i < count($phys_names); $i++) { |
|
693 | 693 | if ($is_assim_move) { |
694 | 694 | // file is in |
695 | 695 | // project/results/<batchid>/<wu_name>__file_<log_name> |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | // |
87 | 87 | function unzip_batch_file($user, $batch_file) { |
88 | 88 | @mkdir("../../buda_batches"); |
89 | - for ($i=0; $i<1000; $i++) { |
|
89 | + for ($i = 0; $i < 1000; $i++) { |
|
90 | 90 | $batch_dir = "../../buda_batches/$i"; |
91 | 91 | $batch_dir_name = $i; |
92 | 92 | $ret = @mkdir($batch_dir); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | } |
138 | 138 | $job_files = []; |
139 | 139 | $cmdline = ''; |
140 | - foreach(scandir("$batch_dir/$fname") as $f2) { |
|
140 | + foreach (scandir("$batch_dir/$fname") as $f2) { |
|
141 | 141 | if ($f2[0] == '.') continue; |
142 | 142 | if ($f2 == 'cmdline') { |
143 | 143 | $cmdline = trim(file_get_contents("$batch_dir/$fname/cmdline")); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | function stage_input_files($batch_dir, $batch_desc, $batch_id) { |
188 | 188 | $n = count($batch_desc->shared_files); |
189 | 189 | $batch_desc->shared_files_phys_names = []; |
190 | - for ($i=0; $i<$n; $i++) { |
|
190 | + for ($i = 0; $i < $n; $i++) { |
|
191 | 191 | $path = sprintf('%s/%s', $batch_dir, $batch_desc->shared_files[$i]); |
192 | 192 | [$md5, $size] = $batch_desc->shared_file_infos[$i]; |
193 | 193 | $phys_name = sprintf('batch_%d_%s', $batch_id, $md5); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | foreach ($batch_desc->jobs as $job) { |
198 | 198 | $n = count($batch_desc->unshared_files); |
199 | 199 | $job->phys_names = []; |
200 | - for ($i=0; $i<$n; $i++) { |
|
200 | + for ($i = 0; $i < $n; $i++) { |
|
201 | 201 | $path = sprintf('%s/%s/%s', |
202 | 202 | $batch_dir, $job->dir, $batch_desc->unshared_files[$i] |
203 | 203 | ); |
@@ -245,7 +245,7 @@ discard block |
||
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( |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | $max_runtime_days = (double)$max_runtime_days; |
292 | 292 | if ($max_runtime_days <= 0) error_page('bad runtime limit'); |
293 | 293 | if ($max_runtime_days > 100) error_page('bad runtime limit'); |
294 | - $max_fpops = $max_runtime_days * AVG_CPU_FPOPS * 86400; |
|
294 | + $max_fpops = $max_runtime_days*AVG_CPU_FPOPS*86400; |
|
295 | 295 | |
296 | 296 | $exp_runtime_days = get_str('exp_runtime_days'); |
297 | 297 | if (!is_numeric($exp_runtime_days)) error_page('bad expected runtime'); |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | if ($exp_runtime_days > $max_runtime_days) { |
302 | 302 | error_page('exp must be < max runtime'); |
303 | 303 | } |
304 | - $exp_fpops = $exp_runtime_days * AVG_CPU_FPOPS * 86400; |
|
304 | + $exp_fpops = $exp_runtime_days*AVG_CPU_FPOPS*86400; |
|
305 | 305 | |
306 | 306 | $app_desc = get_buda_desc($app); |
307 | 307 |