Passed
Push — dpa_buda6 ( 1ca231 )
by David
14:32
created
html/user/buda_submit.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 //
62 62
 function unzip_batch_file($user, $batch_file) {
63 63
     @mkdir("../../buda_batches");
64
-    for ($i=0; $i<1000; $i++) {
64
+    for ($i = 0; $i < 1000; $i++) {
65 65
         $batch_dir = "../../buda_batches/$i";
66 66
         $batch_dir_name = $i;
67 67
         $ret = @mkdir($batch_dir);
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         }
113 113
         $job_files = [];
114 114
         $cmdline = '';
115
-        foreach(scandir("$batch_dir/$fname") as $f2) {
115
+        foreach (scandir("$batch_dir/$fname") as $f2) {
116 116
             if ($f2[0] == '.') continue;
117 117
             if ($f2 == 'cmdline') {
118 118
                 $cmdline = trim(file_get_contents("$batch_dir/$fname/cmdline"));
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 function stage_input_files($batch_dir, $batch_desc, $batch_id) {
163 163
     $n = count($batch_desc->shared_files);
164 164
     $batch_desc->shared_files_phys_names = [];
165
-    for ($i=0; $i<$n; $i++) {
165
+    for ($i = 0; $i < $n; $i++) {
166 166
         $path = sprintf('%s/%s', $batch_dir, $batch_desc->shared_files[$i]);
167 167
         [$md5, $size] = $batch_desc->shared_file_infos[$i];
168 168
         $phys_name = sprintf('batch_%d_%s', $batch_id, $md5);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     foreach ($batch_desc->jobs as $job) {
173 173
         $n = count($batch_desc->unshared_files);
174 174
         $job->phys_names = [];
175
-        for ($i=0; $i<$n; $i++) {
175
+        for ($i = 0; $i < $n; $i++) {
176 176
             $path = sprintf('%s/%s/%s',
177 177
                 $batch_dir, $job->dir, $batch_desc->unshared_files[$i]
178 178
             );
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
     }
221 221
     $cw_cmdline = sprintf('"--dockerfile %s %s %s"',
222 222
         $variant_desc->dockerfile,
223
-        $wrapper_verbose?'--verbose':'',
223
+        $wrapper_verbose ? '--verbose' : '',
224 224
         $cmdline
225 225
     );
226 226
     $cmd = sprintf(
Please login to merge, or discard this patch.
html/user/buda.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 // show list of BUDA apps and variants,
33 33
 // w/ buttons for adding and deleting
34 34
 //
35
-function app_list($notice=null) {
35
+function app_list($notice = null) {
36 36
     global $buda_root;
37 37
     if (!is_dir($buda_root)) {
38 38
         mkdir($buda_root);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
     $dir = "$buda_root/$app/$variant";
97 97
     start_table();
98 98
     table_header('name', 'size', 'md5');
99
-    foreach(scandir($dir) as $f) {
99
+    foreach (scandir($dir) as $f) {
100 100
         if ($f[0] == '.') continue;
101 101
         [$md5, $size] = parse_info_file("$dir/.md5/$f");
102 102
         table_row(
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     //
173 173
     $x = "<input_template>\n";
174 174
     $ninfiles = 1 + count($variant_desc->input_file_names) + count($variant_desc->app_files);
175
-    for ($i=0; $i<$ninfiles; $i++) {
175
+    for ($i = 0; $i < $ninfiles; $i++) {
176 176
         $x .= "   <file_info>\n      <no_delete/>\n   </file_info>\n";
177 177
     }
178 178
     $x .= "   <workunit>\n";
Please login to merge, or discard this patch.