Completed
Pull Request — master (#24)
by
unknown
03:47
created
src/Http/Request.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -161,6 +161,10 @@
 block discarded – undo
161 161
         return false;
162 162
     }
163 163
 
164
+    /**
165
+     * @param resource $stream
166
+     * @param string $boundary
167
+     */
164 168
     private function parseMultipartFormData($stream, $boundary) {
165 169
         $post = "";
166 170
         $files = [];
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             $this->params[strtoupper($name)] = $value;
51 51
         }
52 52
 
53
-        $this->stdin  = $stdin;
53
+        $this->stdin = $stdin;
54 54
 
55 55
         rewind($this->stdin);
56 56
     }
@@ -169,14 +169,14 @@  discard block
 block discarded – undo
169 169
 
170 170
         while (!feof($stream)) {
171 171
             $get_content = $field_name && !$in_header;
172
-            $buffer = stream_get_line($stream, static::$buffer_size, "\r\n" . ($get_content ? '--'.$boundary : ''));
172
+            $buffer = stream_get_line($stream, static::$buffer_size, "\r\n".($get_content ? '--'.$boundary : ''));
173 173
 
174 174
             if ($in_header && strlen($buffer) == 0) {
175 175
                 $in_header = false;
176 176
             } else {
177 177
                 if ($get_content) {
178 178
                     if ($field_type === 'data') {
179
-                        $post .= (isset($post[0]) ? '&' : '') . $field_name . "=" . urlencode($buffer);
179
+                        $post .= (isset($post[0]) ? '&' : '').$field_name."=".urlencode($buffer);
180 180
                     } elseif ($field_type === 'file' && $filename) {
181 181
                         $tmp_path = $this->getUploadDir().'/'.substr(md5(rand().time()), 0, 16);
182 182
                         $err = file_put_contents($tmp_path, $buffer);
Please login to merge, or discard this patch.