Passed
Pull Request — master (#5932)
by David
09:51
created
html/user/buda_submit.php 1 patch
Spacing   +6 added lines, -6 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
             );
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
     }
217 217
     $cw_cmdline = sprintf('"--dockerfile %s %s %s"',
218 218
         $variant_desc->dockerfile,
219
-        $wrapper_verbose?'--verbose':'',
219
+        $wrapper_verbose ? '--verbose' : '',
220 220
         $cmdline
221 221
     );
222 222
     $cmd = sprintf(
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
     //
287 287
     $x = "<input_template>\n";
288 288
     $ninfiles = 1 + count($variant_desc->input_file_names) + count($variant_desc->app_files);
289
-    for ($i=0; $i<$ninfiles; $i++) {
289
+    for ($i = 0; $i < $ninfiles; $i++) {
290 290
         $x .= "   <file_info>\n      <no_delete/>\n   </file_info>\n";
291 291
     }
292 292
     $x .= "   <workunit>\n";
Please login to merge, or discard this patch.
html/user/sandbox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     } else {
107 107
         sort($files);
108 108
         start_table();
109
-        table_header("Name<br><small>(click to view text files)</small>", "Modified", "Size (bytes)", "MD5", "Delete","Download");
109
+        table_header("Name<br><small>(click to view text files)</small>", "Modified", "Size (bytes)", "MD5", "Delete", "Download");
110 110
         foreach ($files as $f) {
111 111
             [$md5, $size] = sandbox_parse_info_file($user, $f);
112 112
             $path = "$dir/$f";
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     $notice = "";
139 139
     $dir = sandbox_dir($user);
140 140
     $count = count($_FILES['new_file']['tmp_name']);
141
-    for ($i=0; $i<$count; $i++) {
141
+    for ($i = 0; $i < $count; $i++) {
142 142
         $tmp_name = $_FILES['new_file']['tmp_name'][$i];
143 143
         if (!is_uploaded_file($tmp_name)) {
144 144
             error_page("$tmp_name is not uploaded file");
Please login to merge, or discard this patch.