Completed
Push — master ( 90807b...d6bfdd )
by Tobias
05:03
created
tests/StreamTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $this->assertFalse($stream->isWritable());
114 114
         $this->assertFalse($stream->isSeekable());
115 115
 
116
-        $throws = function (callable $fn) use ($stream) {
116
+        $throws = function(callable $fn) use ($stream) {
117 117
             try {
118 118
                 $fn($stream);
119 119
                 $this->fail();
@@ -121,25 +121,25 @@  discard block
 block discarded – undo
121 121
             }
122 122
         };
123 123
 
124
-        $throws(function ($stream) {
124
+        $throws(function($stream) {
125 125
             $stream->read(10);
126 126
         });
127
-        $throws(function ($stream) {
127
+        $throws(function($stream) {
128 128
             $stream->write('bar');
129 129
         });
130
-        $throws(function ($stream) {
130
+        $throws(function($stream) {
131 131
             $stream->seek(10);
132 132
         });
133
-        $throws(function ($stream) {
133
+        $throws(function($stream) {
134 134
             $stream->tell();
135 135
         });
136
-        $throws(function ($stream) {
136
+        $throws(function($stream) {
137 137
             $stream->eof();
138 138
         });
139
-        $throws(function ($stream) {
139
+        $throws(function($stream) {
140 140
             $stream->getSize();
141 141
         });
142
-        $throws(function ($stream) {
142
+        $throws(function($stream) {
143 143
             $stream->getContents();
144 144
         });
145 145
         $this->assertSame('', (string) $stream);
Please login to merge, or discard this patch.
tests/UriTest.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -212,61 +212,61 @@
 block discarded – undo
212 212
     public function getResolveTestCases()
213 213
     {
214 214
         return [
215
-            [self::RFC3986_BASE, 'g:h',           'g:h'],
216
-            [self::RFC3986_BASE, 'g',             'http://a/b/c/g'],
217
-            [self::RFC3986_BASE, './g',           'http://a/b/c/g'],
218
-            [self::RFC3986_BASE, 'g/',            'http://a/b/c/g/'],
219
-            [self::RFC3986_BASE, '/g',            'http://a/g'],
220
-            [self::RFC3986_BASE, '//g',           'http://g'],
221
-            [self::RFC3986_BASE, '?y',            'http://a/b/c/d;p?y'],
222
-            [self::RFC3986_BASE, 'g?y',           'http://a/b/c/g?y'],
223
-            [self::RFC3986_BASE, '#s',            'http://a/b/c/d;p?q#s'],
224
-            [self::RFC3986_BASE, 'g#s',           'http://a/b/c/g#s'],
225
-            [self::RFC3986_BASE, 'g?y#s',         'http://a/b/c/g?y#s'],
226
-            [self::RFC3986_BASE, ';x',            'http://a/b/c/;x'],
227
-            [self::RFC3986_BASE, 'g;x',           'http://a/b/c/g;x'],
228
-            [self::RFC3986_BASE, 'g;x?y#s',       'http://a/b/c/g;x?y#s'],
229
-            [self::RFC3986_BASE, '',              self::RFC3986_BASE],
230
-            [self::RFC3986_BASE, '.',             'http://a/b/c/'],
231
-            [self::RFC3986_BASE, './',            'http://a/b/c/'],
232
-            [self::RFC3986_BASE, '..',            'http://a/b/'],
233
-            [self::RFC3986_BASE, '../',           'http://a/b/'],
234
-            [self::RFC3986_BASE, '../g',          'http://a/b/g'],
235
-            [self::RFC3986_BASE, '../..',         'http://a/'],
236
-            [self::RFC3986_BASE, '../../',        'http://a/'],
237
-            [self::RFC3986_BASE, '../../g',       'http://a/g'],
238
-            [self::RFC3986_BASE, '../../../g',    'http://a/g'],
215
+            [self::RFC3986_BASE, 'g:h', 'g:h'],
216
+            [self::RFC3986_BASE, 'g', 'http://a/b/c/g'],
217
+            [self::RFC3986_BASE, './g', 'http://a/b/c/g'],
218
+            [self::RFC3986_BASE, 'g/', 'http://a/b/c/g/'],
219
+            [self::RFC3986_BASE, '/g', 'http://a/g'],
220
+            [self::RFC3986_BASE, '//g', 'http://g'],
221
+            [self::RFC3986_BASE, '?y', 'http://a/b/c/d;p?y'],
222
+            [self::RFC3986_BASE, 'g?y', 'http://a/b/c/g?y'],
223
+            [self::RFC3986_BASE, '#s', 'http://a/b/c/d;p?q#s'],
224
+            [self::RFC3986_BASE, 'g#s', 'http://a/b/c/g#s'],
225
+            [self::RFC3986_BASE, 'g?y#s', 'http://a/b/c/g?y#s'],
226
+            [self::RFC3986_BASE, ';x', 'http://a/b/c/;x'],
227
+            [self::RFC3986_BASE, 'g;x', 'http://a/b/c/g;x'],
228
+            [self::RFC3986_BASE, 'g;x?y#s', 'http://a/b/c/g;x?y#s'],
229
+            [self::RFC3986_BASE, '', self::RFC3986_BASE],
230
+            [self::RFC3986_BASE, '.', 'http://a/b/c/'],
231
+            [self::RFC3986_BASE, './', 'http://a/b/c/'],
232
+            [self::RFC3986_BASE, '..', 'http://a/b/'],
233
+            [self::RFC3986_BASE, '../', 'http://a/b/'],
234
+            [self::RFC3986_BASE, '../g', 'http://a/b/g'],
235
+            [self::RFC3986_BASE, '../..', 'http://a/'],
236
+            [self::RFC3986_BASE, '../../', 'http://a/'],
237
+            [self::RFC3986_BASE, '../../g', 'http://a/g'],
238
+            [self::RFC3986_BASE, '../../../g', 'http://a/g'],
239 239
             [self::RFC3986_BASE, '../../../../g', 'http://a/g'],
240
-            [self::RFC3986_BASE, '/./g',          'http://a/g'],
241
-            [self::RFC3986_BASE, '/../g',         'http://a/g'],
242
-            [self::RFC3986_BASE, 'g.',            'http://a/b/c/g.'],
243
-            [self::RFC3986_BASE, '.g',            'http://a/b/c/.g'],
244
-            [self::RFC3986_BASE, 'g..',           'http://a/b/c/g..'],
245
-            [self::RFC3986_BASE, '..g',           'http://a/b/c/..g'],
246
-            [self::RFC3986_BASE, './../g',        'http://a/b/g'],
247
-            [self::RFC3986_BASE, 'foo////g',      'http://a/b/c/foo////g'],
248
-            [self::RFC3986_BASE, './g/.',         'http://a/b/c/g/'],
249
-            [self::RFC3986_BASE, 'g/./h',         'http://a/b/c/g/h'],
250
-            [self::RFC3986_BASE, 'g/../h',        'http://a/b/c/h'],
251
-            [self::RFC3986_BASE, 'g;x=1/./y',     'http://a/b/c/g;x=1/y'],
252
-            [self::RFC3986_BASE, 'g;x=1/../y',    'http://a/b/c/y'],
240
+            [self::RFC3986_BASE, '/./g', 'http://a/g'],
241
+            [self::RFC3986_BASE, '/../g', 'http://a/g'],
242
+            [self::RFC3986_BASE, 'g.', 'http://a/b/c/g.'],
243
+            [self::RFC3986_BASE, '.g', 'http://a/b/c/.g'],
244
+            [self::RFC3986_BASE, 'g..', 'http://a/b/c/g..'],
245
+            [self::RFC3986_BASE, '..g', 'http://a/b/c/..g'],
246
+            [self::RFC3986_BASE, './../g', 'http://a/b/g'],
247
+            [self::RFC3986_BASE, 'foo////g', 'http://a/b/c/foo////g'],
248
+            [self::RFC3986_BASE, './g/.', 'http://a/b/c/g/'],
249
+            [self::RFC3986_BASE, 'g/./h', 'http://a/b/c/g/h'],
250
+            [self::RFC3986_BASE, 'g/../h', 'http://a/b/c/h'],
251
+            [self::RFC3986_BASE, 'g;x=1/./y', 'http://a/b/c/g;x=1/y'],
252
+            [self::RFC3986_BASE, 'g;x=1/../y', 'http://a/b/c/y'],
253 253
             // dot-segments in the query or fragment
254
-            [self::RFC3986_BASE, 'g?y/./x',       'http://a/b/c/g?y/./x'],
255
-            [self::RFC3986_BASE, 'g?y/../x',      'http://a/b/c/g?y/../x'],
256
-            [self::RFC3986_BASE, 'g#s/./x',       'http://a/b/c/g#s/./x'],
257
-            [self::RFC3986_BASE, 'g#s/../x',      'http://a/b/c/g#s/../x'],
258
-            [self::RFC3986_BASE, 'g#s/../x',      'http://a/b/c/g#s/../x'],
259
-            [self::RFC3986_BASE, '?y#s',          'http://a/b/c/d;p?y#s'],
260
-            ['http://a/b/c/d;p?q#s', '?y',        'http://a/b/c/d;p?y'],
261
-            ['http://u@a/b/c/d;p?q', '.',         'http://u@a/b/c/'],
262
-            ['http://u:p@a/b/c/d;p?q', '.',       'http://u:p@a/b/c/'],
263
-            ['http://a/b/c/d/', 'e',              'http://a/b/c/d/e'],
264
-            ['urn:no-slash', 'e',                 'urn:e'],
254
+            [self::RFC3986_BASE, 'g?y/./x', 'http://a/b/c/g?y/./x'],
255
+            [self::RFC3986_BASE, 'g?y/../x', 'http://a/b/c/g?y/../x'],
256
+            [self::RFC3986_BASE, 'g#s/./x', 'http://a/b/c/g#s/./x'],
257
+            [self::RFC3986_BASE, 'g#s/../x', 'http://a/b/c/g#s/../x'],
258
+            [self::RFC3986_BASE, 'g#s/../x', 'http://a/b/c/g#s/../x'],
259
+            [self::RFC3986_BASE, '?y#s', 'http://a/b/c/d;p?y#s'],
260
+            ['http://a/b/c/d;p?q#s', '?y', 'http://a/b/c/d;p?y'],
261
+            ['http://u@a/b/c/d;p?q', '.', 'http://u@a/b/c/'],
262
+            ['http://u:p@a/b/c/d;p?q', '.', 'http://u:p@a/b/c/'],
263
+            ['http://a/b/c/d/', 'e', 'http://a/b/c/d/e'],
264
+            ['urn:no-slash', 'e', 'urn:e'],
265 265
             // falsey relative parts
266
-            [self::RFC3986_BASE, '//0',           'http://0'],
267
-            [self::RFC3986_BASE, '0',             'http://a/b/c/0'],
268
-            [self::RFC3986_BASE, '?0',            'http://a/b/c/d;p?0'],
269
-            [self::RFC3986_BASE, '#0',            'http://a/b/c/d;p?q#0'],
266
+            [self::RFC3986_BASE, '//0', 'http://0'],
267
+            [self::RFC3986_BASE, '0', 'http://a/b/c/0'],
268
+            [self::RFC3986_BASE, '?0', 'http://a/b/c/d;p?0'],
269
+            [self::RFC3986_BASE, '#0', 'http://a/b/c/d;p?q#0'],
270 270
         ];
271 271
     }
272 272
 
Please login to merge, or discard this patch.
src/RequestTrait.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -39,6 +39,9 @@
 block discarded – undo
39 39
         return $target;
40 40
     }
41 41
 
42
+    /**
43
+     * @param string $requestTarget
44
+     */
42 45
     public function withRequestTarget($requestTarget): self
43 46
     {
44 47
         if (preg_match('#\s#', $requestTarget)) {
Please login to merge, or discard this patch.
src/MessageTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@
 block discarded – undo
192 192
             }
193 193
         }
194 194
 
195
-        return array_map(function (string $value) {
195
+        return array_map(function(string $value) {
196 196
             return trim($value, " \t");
197 197
         }, $values);
198 198
     }
Please login to merge, or discard this patch.
src/UploadedFile.php 1 patch
Doc Comments   +17 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,6 +79,9 @@  discard block
 block discarded – undo
79 79
         }
80 80
     }
81 81
 
82
+    /**
83
+     * @param integer $error
84
+     */
82 85
     private function setError($error): void
83 86
     {
84 87
         if (false === \is_int($error)) {
@@ -92,6 +95,9 @@  discard block
 block discarded – undo
92 95
         $this->error = $error;
93 96
     }
94 97
 
98
+    /**
99
+     * @param integer $size
100
+     */
95 101
     private function setSize($size): void
96 102
     {
97 103
         if (false === \is_int($size)) {
@@ -106,11 +112,17 @@  discard block
 block discarded – undo
106 112
         return \in_array(\gettype($param), ['string', 'NULL']);
107 113
     }
108 114
 
115
+    /**
116
+     * @param string $param
117
+     */
109 118
     private function isStringNotEmpty($param): bool
110 119
     {
111 120
         return \is_string($param) && false === empty($param);
112 121
     }
113 122
 
123
+    /**
124
+     * @param string|null $clientFilename
125
+     */
114 126
     private function setClientFilename($clientFilename): void
115 127
     {
116 128
         if (false === $this->isStringOrNull($clientFilename)) {
@@ -120,6 +132,9 @@  discard block
 block discarded – undo
120 132
         $this->clientFilename = $clientFilename;
121 133
     }
122 134
 
135
+    /**
136
+     * @param string|null $clientMediaType
137
+     */
123 138
     private function setClientMediaType($clientMediaType): void
124 139
     {
125 140
         if (false === $this->isStringOrNull($clientMediaType)) {
@@ -214,8 +229,8 @@  discard block
 block discarded – undo
214 229
      *
215 230
      * @author Michael Dowling and contributors to guzzlehttp/psr7
216 231
      *
217
-     * @param StreamInterface $source Stream to read from
218
-     * @param StreamInterface $dest   Stream to write to
232
+     * @param \Psr\Http\Message\StreamInterface $source Stream to read from
233
+     * @param \Psr\Http\Message\StreamInterface $dest   Stream to write to
219 234
      * @param int             $maxLen Maximum number of bytes to read. Pass -1
220 235
      *                                to read the entire stream
221 236
      *
Please login to merge, or discard this patch.