Passed
Push — master ( 6de3bf...5eea94 )
by Vitalii
11:52 queued 01:00
created
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.