Completed
Push — master ( 6faa20...05d108 )
by Melech
04:48
created
src/Valkyrja/Http/Factories/FileFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
         $normalizedFiles = [];
107 107
 
108 108
         foreach (array_keys($files['tmp_name']) as $key) {
109
-            $spec                  = [
109
+            $spec = [
110 110
                 'tmp_name' => $files['tmp_name'][$key],
111 111
                 'size'     => $files['size'][$key],
112 112
                 'error'    => $files['error'][$key],
Please login to merge, or discard this patch.
src/Valkyrja/Http/Factories/UriFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             $scheme = 'https';
73 73
         }
74 74
 
75
-        if (! empty($scheme)) {
75
+        if (!empty($scheme)) {
76 76
             $uri = $uri->withScheme($scheme);
77 77
         }
78 78
 
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
         $host = $accumulator->host;
85 85
         $port = $accumulator->port;
86 86
 
87
-        if (! empty($host)) {
87
+        if (!empty($host)) {
88 88
             $uri = $uri->withHost($host);
89 89
 
90
-            if (! empty($port)) {
90
+            if (!empty($port)) {
91 91
                 $uri = $uri->withPort($port);
92 92
             }
93 93
         }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
             return;
174 174
         }
175 175
 
176
-        if (! isset($server['SERVER_NAME'])) {
176
+        if (!isset($server['SERVER_NAME'])) {
177 177
             return;
178 178
         }
179 179
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             $accumulator->port = (int) $server['SERVER_PORT'];
184 184
         }
185 185
 
186
-        if (! isset($server['SERVER_ADDR']) || ! preg_match('/^\[[0-9a-fA-F\:]+\]$/', $accumulator->host)) {
186
+        if (!isset($server['SERVER_ADDR']) || !preg_match('/^\[[0-9a-fA-F\:]+\]$/', $accumulator->host)) {
187 187
             return;
188 188
         }
189 189
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $iisUrlRewritten = self::get('IIS_WasUrlRewritten', $server);
213 213
         $unencodedUrl    = self::get('UNENCODED_URL', $server, '');
214 214
 
215
-        if ('1' === $iisUrlRewritten && ! empty($unencodedUrl)) {
215
+        if ('1' === $iisUrlRewritten && !empty($unencodedUrl)) {
216 216
             return $unencodedUrl;
217 217
         }
218 218
 
Please login to merge, or discard this patch.
src/Valkyrja/Http/Support/HeaderSecurity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public static function assertValid(string $value): void
104 104
     {
105
-        if (! self::isValid($value)) {
105
+        if (!self::isValid($value)) {
106 106
             throw new InvalidArgumentException(sprintf('"%s" is not valid header value', $value));
107 107
         }
108 108
     }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public static function assertValidName(string $name): void
158 158
     {
159
-        if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $name)) {
159
+        if (!preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $name)) {
160 160
             throw new InvalidArgumentException(sprintf('"%s" is not valid header name', $name));
161 161
         }
162 162
     }
Please login to merge, or discard this patch.
src/Valkyrja/Http/Streams/StreamHelpers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $resource = fopen($stream, $mode);
76 76
 
77 77
         // If the resource isn't a resource or a stream resource type
78
-        if (! is_resource($resource) || 'stream' !== get_resource_type($resource)) {
78
+        if (!is_resource($resource) || 'stream' !== get_resource_type($resource)) {
79 79
             // Throw a new invalid stream exception
80 80
             throw new InvalidStream(
81 81
                 'Invalid stream provided; must be a string stream identifier or stream resource'
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     protected function verifyWritable(): void
150 150
     {
151 151
         // If the stream isn't writable
152
-        if (! $this->isWritable()) {
152
+        if (!$this->isWritable()) {
153 153
             // Throw a new runtime exception
154 154
             throw new RuntimeException('Stream is not writable');
155 155
         }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     protected function verifySeekable(): void
180 180
     {
181 181
         // If the stream isn't seekable
182
-        if (! $this->isSeekable()) {
182
+        if (!$this->isSeekable()) {
183 183
             // Throw a new runtime exception
184 184
             throw new RuntimeException('Stream is not seekable');
185 185
         }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     protected function verifyReadable(): void
223 223
     {
224 224
         // If the stream is not readable
225
-        if (! $this->isReadable()) {
225
+        if (!$this->isReadable()) {
226 226
             // Throw a runtime exception
227 227
             throw new RuntimeException('Stream is not readable');
228 228
         }
Please login to merge, or discard this patch.
src/Valkyrja/Http/Streams/Stream.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     public function __toString()
218 218
     {
219 219
         // If the stream is not readable
220
-        if (! $this->isReadable()) {
220
+        if (!$this->isReadable()) {
221 221
             // Return an empty string
222 222
             return '';
223 223
         }
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
     public function getContents(): string
354 354
     {
355 355
         // If the stream isn't readable
356
-        if (! $this->isReadable()) {
356
+        if (!$this->isReadable()) {
357 357
             // Throw a runtime exception
358 358
             throw new RuntimeException('Stream is not readable');
359 359
         }
Please login to merge, or discard this patch.
src/Valkyrja/Http/Models/Cookie.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -419,7 +419,7 @@
 block discarded – undo
419 419
      */
420 420
     public function setSameSite(string $sameSite = null): self
421 421
     {
422
-        if (! in_array($sameSite, [SameSite::LAX, SameSite::STRICT, null], true)) {
422
+        if (!in_array($sameSite, [SameSite::LAX, SameSite::STRICT, null], true)) {
423 423
             throw new InvalidSameSiteTypeException(
424 424
                 'The "sameSite" parameter value is not valid.'
425 425
             );
Please login to merge, or discard this patch.
src/Valkyrja/Http/Requests/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
         ) {
164 164
             $this->parsedJson = Arr::fromString((string) $this->stream);
165 165
 
166
-            if (! $parsedBody) {
166
+            if (!$parsedBody) {
167 167
                 $parsedBody = $this->parsedJson;
168 168
             }
169 169
         }
Please login to merge, or discard this patch.
src/Valkyrja/Http/Requests/RequestTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             return $new;
231 231
         }
232 232
 
233
-        if (! $uri->getHost()) {
233
+        if (!$uri->getHost()) {
234 234
             return $new;
235 235
         }
236 236
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
      */
271 271
     protected function validateMethod(string $method): void
272 272
     {
273
-        if (! in_array($method, RequestMethod::ANY, true)) {
273
+        if (!in_array($method, RequestMethod::ANY, true)) {
274 274
             throw new InvalidMethod(sprintf('Unsupported HTTP method "%s" provided', $method));
275 275
         }
276 276
     }
Please login to merge, or discard this patch.
src/Valkyrja/Http/Uris/UriHelpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $scheme = strtolower($scheme);
70 70
         $scheme = (string) preg_replace('#:(//)?$#', '', $scheme);
71 71
 
72
-        if (! $scheme) {
72
+        if (!$scheme) {
73 73
             return '';
74 74
         }
75 75
 
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
      */
148 148
     protected function isStandardPort(): bool
149 149
     {
150
-        if (! $this->scheme) {
150
+        if (!$this->scheme) {
151 151
             return $this->host && $this->port === null;
152 152
         }
153 153
 
154
-        if (! $this->host || $this->port === null) {
154
+        if (!$this->host || $this->port === null) {
155 155
             return true;
156 156
         }
157 157
 
Please login to merge, or discard this patch.