Passed
Push — dpa_docker4 ( 2ae1d9 )
by David
10:18
created
html/user/buda_submit.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 //
61 61
 function unzip_batch_file($user, $batch_file) {
62 62
     @mkdir("../../buda_batches");
63
-    for ($i=0; $i<1000; $i++) {
63
+    for ($i = 0; $i < 1000; $i++) {
64 64
         $batch_dir = "../../buda_batches/$i";
65 65
         $batch_dir_name = $i;
66 66
         $ret = @mkdir($batch_dir);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         }
112 112
         $job_files = [];
113 113
         $cmdline = '';
114
-        foreach(scandir("$batch_dir/$fname") as $f2) {
114
+        foreach (scandir("$batch_dir/$fname") as $f2) {
115 115
             if ($f2[0] == '.') continue;
116 116
             if ($f2 == 'cmdline') {
117 117
                 $cmdline = trim(file_get_contents("$batch_dir/$f2"));
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 function stage_input_files($batch_dir, $batch_desc, $batch_id) {
161 161
     $n = count($batch_desc->shared_files);
162 162
     $batch_desc->shared_files_phys_names = [];
163
-    for ($i=0; $i<$n; $i++) {
163
+    for ($i = 0; $i < $n; $i++) {
164 164
         $path = sprintf('%s/%s', $batch_dir, $batch_desc->shared_files[$i]);
165 165
         [$md5, $size] = $batch_desc->shared_file_infos[$i];
166 166
         $phys_name = sprintf('batch_%d_%s', $batch_id, $md5);
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     foreach ($batch_desc->jobs as $job) {
171 171
         $n = count($batch_desc->unshared_files);
172 172
         $job->phys_names = [];
173
-        for ($i=0; $i<$n; $i++) {
173
+        for ($i = 0; $i < $n; $i++) {
174 174
             $path = sprintf('%s/%s/%s',
175 175
                 $batch_dir, $job->dir, $batch_desc->unshared_files[$i]
176 176
             );
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         'cd ../..; bin/create_work --appname %s --batch %d --stdin --command_line "--dockerfile %s %s" --wu_template %s --result_template %s',
216 216
         $buda_app->name, $batch_id,
217 217
         $variant_desc->dockerfile,
218
-        $wrapper_verbose?'--verbose':'',
218
+        $wrapper_verbose ? '--verbose' : '',
219 219
         "buda_batches/$batch_dir_name/template_in",
220 220
         "buda_batches/$batch_dir_name/template_out"
221 221
     );
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
     //
279 279
     $x = "<input_template>\n";
280 280
     $ninfiles = 1 + count($variant_desc->input_file_names) + count($variant_desc->app_files);
281
-    for ($i=0; $i<$ninfiles; $i++) {
281
+    for ($i = 0; $i < $ninfiles; $i++) {
282 282
         $x .= "   <file_info>\n      <no_delete/>\n   </file_info>\n";
283 283
     }
284 284
     $x .= "   <workunit>\n";
Please login to merge, or discard this patch.