Completed
Branch master (e21175)
by Terry
03:17 queued 01:38
created
src/Psr7/Utils/UploadedFileHelper.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,13 +28,13 @@
 block discarded – undo
28 28
 class UploadedFileHelper
29 29
 {
30 30
 /**
31
-     * Create an array for PSR-7 Uploaded File needed.
32
-     * 
33
-     * @param array $files     An array generally from $_FILES
34
-     * @param bool  $isConvert To covert and return $files as an UploadedFile instance.
35
-     * 
36
-     * @return array|UploadedFile
37
-     */
31
+ * Create an array for PSR-7 Uploaded File needed.
32
+ * 
33
+ * @param array $files     An array generally from $_FILES
34
+ * @param bool  $isConvert To covert and return $files as an UploadedFile instance.
35
+ * 
36
+ * @return array|UploadedFile
37
+ */
38 38
     public static function uploadedFileParse(array $files)
39 39
     {
40 40
         $specTree = [];
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
 
133 133
         if (is_array($values)) {
134 134
 
135
-            foreach($values as $key => $value) {
135
+            foreach ($values as $key => $value) {
136 136
 
137 137
                 // Restore the keys back to the original ones.
138 138
                 $key = rtrim($key, '_');
Please login to merge, or discard this patch.
src/Psr7/ServerRequest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -94,14 +94,14 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function __construct(
96 96
         string $method       = 'GET',
97
-               $uri          = ''   ,
98
-               $body         = ''   ,
99
-        array  $headers      = []   ,
97
+               $uri          = '',
98
+               $body         = '',
99
+        array  $headers      = [],
100 100
         string $version      = '1.1',
101
-        array  $serverParams = []   ,
102
-        array  $cookieParams = []   ,
103
-        array  $postParams   = []   ,
104
-        array  $getParams    = []   ,
101
+        array  $serverParams = [],
102
+        array  $cookieParams = [],
103
+        array  $postParams   = [],
104
+        array  $getParams    = [],
105 105
         array  $filesParams  = []
106 106
     ) {
107 107
         parent::__construct($method, $uri, $body, $headers, $version);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         // the UploadedFile instance(s) as the $filesParams is given.
117 117
         $this->uploadedFiles = [];
118 118
 
119
-        if (! empty($filesParams)) {
119
+        if (!empty($filesParams)) {
120 120
             $this->uploadedFiles = UploadedFileHelper::uploadedFileSpecsConvert(
121 121
                 UploadedFileHelper::uploadedFileParse($filesParams)
122 122
             );
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
         foreach ($values as $value) {
273 273
             if (is_array($value)) {
274 274
                 $this->assertUploadedFiles($value);
275
-            } elseif (! ($value instanceof UploadedFileInterface)) {
275
+            } elseif (!($value instanceof UploadedFileInterface)) {
276 276
                 throw new InvalidArgumentException(
277 277
                     'Invalid PSR-7 array structure for handling UploadedFile.'
278 278
                 );
@@ -293,9 +293,9 @@  discard block
 block discarded – undo
293 293
     protected function assertParsedBody($data): void
294 294
     {
295 295
         if (
296
-            ! is_null($data) &&
297
-            ! is_array($data) && 
298
-            ! is_object($data)
296
+            !is_null($data) &&
297
+            !is_array($data) && 
298
+            !is_object($data)
299 299
         ) {
300 300
             throw new InvalidArgumentException(
301 301
                 sprintf(
Please login to merge, or discard this patch.