Passed
Push — main ( 2cb152...6ff26f )
by TARIQ
23:50
created
brighty/system/HTTP/UserAgent.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function isBrowser(?string $key = null): bool
119 119
     {
120
-        if (! $this->isBrowser) {
120
+        if (!$this->isBrowser) {
121 121
             return false;
122 122
         }
123 123
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      */
138 138
     public function isRobot(?string $key = null): bool
139 139
     {
140
-        if (! $this->isRobot) {
140
+        if (!$this->isRobot) {
141 141
             return false;
142 142
         }
143 143
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function isMobile(?string $key = null): bool
159 159
     {
160
-        if (! $this->isMobile) {
160
+        if (!$this->isMobile) {
161 161
             return false;
162 162
         }
163 163
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function isReferral(): bool
177 177
     {
178
-        if (! isset($this->referrer)) {
178
+        if (!isset($this->referrer)) {
179 179
             if (empty($_SERVER['HTTP_REFERER'])) {
180 180
                 $this->referrer = false;
181 181
             } else {
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         // Set the new user-agent string and parse it, unless empty
263 263
         $this->agent = $string;
264 264
 
265
-        if (! empty($string)) {
265
+        if (!empty($string)) {
266 266
             $this->compileData();
267 267
         }
268 268
     }
Please login to merge, or discard this patch.
brighty/system/HTTP/CURLRequest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     public function __construct(App $config, URI $uri, ?ResponseInterface $response = null, array $options = [])
107 107
     {
108
-        if (! function_exists('curl_version')) {
108
+        if (!function_exists('curl_version')) {
109 109
             throw HTTPException::forMissingCurl(); // @codeCoverageIgnore
110 110
         }
111 111
 
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
         // Reset our curl options so we're on a fresh slate.
338 338
         $curlOptions = [];
339 339
 
340
-        if (! empty($this->config['query']) && is_array($this->config['query'])) {
340
+        if (!empty($this->config['query']) && is_array($this->config['query'])) {
341 341
             // This is likely too naive a solution.
342 342
             // Should look into handling when $url already
343 343
             // has query vars on it.
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 
434 434
         if ($method === 'PUT' || $method === 'POST') {
435 435
             // See http://tools.ietf.org/html/rfc7230#section-3.3.2
436
-            if ($this->header('content-length') === null && ! isset($this->config['multipart'])) {
436
+            if ($this->header('content-length') === null && !isset($this->config['multipart'])) {
437 437
                 $this->setHeader('Content-Length', '0');
438 438
             }
439 439
         } elseif ($method === 'HEAD') {
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
      */
449 449
     protected function applyBody(array $curlOptions = []): array
450 450
     {
451
-        if (! empty($this->body)) {
451
+        if (!empty($this->body)) {
452 452
             $curlOptions[CURLOPT_POSTFIELDS] = (string) $this->getBody();
453 453
         }
454 454
 
@@ -491,10 +491,10 @@  discard block
 block discarded – undo
491 491
     protected function setCURLOptions(array $curlOptions = [], array $config = [])
492 492
     {
493 493
         // Auth Headers
494
-        if (! empty($config['auth'])) {
494
+        if (!empty($config['auth'])) {
495 495
             $curlOptions[CURLOPT_USERPWD] = $config['auth'][0] . ':' . $config['auth'][1];
496 496
 
497
-            if (! empty($config['auth'][2]) && strtolower($config['auth'][2]) === 'digest') {
497
+            if (!empty($config['auth'][2]) && strtolower($config['auth'][2]) === 'digest') {
498 498
                 $curlOptions[CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST;
499 499
             } else {
500 500
                 $curlOptions[CURLOPT_HTTPAUTH] = CURLAUTH_BASIC;
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
         }
503 503
 
504 504
         // Certificate
505
-        if (! empty($config['cert'])) {
505
+        if (!empty($config['cert'])) {
506 506
             $cert = $config['cert'];
507 507
 
508 508
             if (is_array($cert)) {
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
                 $cert                               = $cert[0];
511 511
             }
512 512
 
513
-            if (! is_file($cert)) {
513
+            if (!is_file($cert)) {
514 514
                 throw HTTPException::forSSLCertNotFound($cert);
515 515
             }
516 516
 
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
             if (is_string($config['verify'])) {
523 523
                 $file = realpath($config['ssl_key']) ?: $config['ssl_key'];
524 524
 
525
-                if (! is_file($file)) {
525
+                if (!is_file($file)) {
526 526
                     throw HTTPException::forInvalidSSLKey($config['ssl_key']);
527 527
                 }
528 528
 
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
         }
541 541
 
542 542
         // Decode Content
543
-        if (! empty($config['decode_content'])) {
543
+        if (!empty($config['decode_content'])) {
544 544
             $accept = $this->getHeaderLine('Accept-Encoding');
545 545
 
546 546
             if ($accept) {
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
         $curlOptions[CURLOPT_CONNECTTIMEOUT_MS] = (float) $config['connect_timeout'] * 1000;
587 587
 
588 588
         // Post Data - application/x-www-form-urlencoded
589
-        if (! empty($config['form_params']) && is_array($config['form_params'])) {
589
+        if (!empty($config['form_params']) && is_array($config['form_params'])) {
590 590
             $postFields                      = http_build_query($config['form_params']);
591 591
             $curlOptions[CURLOPT_POSTFIELDS] = $postFields;
592 592
 
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
         }
598 598
 
599 599
         // Post Data - multipart/form-data
600
-        if (! empty($config['multipart']) && is_array($config['multipart'])) {
600
+        if (!empty($config['multipart']) && is_array($config['multipart'])) {
601 601
             // setting the POSTFIELDS option automatically sets multipart
602 602
             $curlOptions[CURLOPT_POSTFIELDS] = $config['multipart'];
603 603
         }
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
         }
616 616
 
617 617
         // version
618
-        if (! empty($config['version'])) {
618
+        if (!empty($config['version'])) {
619 619
             if ($config['version'] === 1.0) {
620 620
                 $curlOptions[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0;
621 621
             } elseif ($config['version'] === 1.1) {
Please login to merge, or discard this patch.
brighty/system/HTTP/IncomingRequest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
         $this->config       = $config;
162 162
         $this->uri          = $uri;
163
-        $this->body         = ! empty($body) ? $body : null;
163
+        $this->body         = !empty($body) ? $body : null;
164 164
         $this->userAgent    = $userAgent;
165 165
         $this->validLocales = $config->supportedLocales;
166 166
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     {
182 182
         $this->locale = $this->defaultLocale = $config->defaultLocale;
183 183
 
184
-        if (! $config->negotiateLocale) {
184
+        if (!$config->negotiateLocale) {
185 185
             return;
186 186
         }
187 187
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      */
239 239
     protected function parseRequestURI(): string
240 240
     {
241
-        if (! isset($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'])) {
241
+        if (!isset($_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'])) {
242 242
             return '';
243 243
         }
244 244
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 
257 257
             foreach (explode('/', $_SERVER['SCRIPT_NAME']) as $i => $segment) {
258 258
                 // If these segments are not the same then we're done
259
-                if (! isset($segments[$i]) || $segment !== $segments[$i]) {
259
+                if (!isset($segments[$i]) || $segment !== $segments[$i]) {
260 260
                     break;
261 261
                 }
262 262
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
      */
365 365
     public function isSecure(): bool
366 366
     {
367
-        if (! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
367
+        if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {
368 368
             return true;
369 369
         }
370 370
 
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
             return true;
373 373
         }
374 374
 
375
-        return $this->hasHeader('Front-End-Https') && ! empty($this->header('Front-End-Https')->getValue()) && strtolower($this->header('Front-End-Https')->getValue()) !== 'off';
375
+        return $this->hasHeader('Front-End-Https') && !empty($this->header('Front-End-Https')->getValue()) && strtolower($this->header('Front-End-Https')->getValue()) !== 'off';
376 376
     }
377 377
 
378 378
     /**
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
             if ($config->forceGlobalSecureRequests && $this->uri->getScheme() === 'http') {
412 412
                 $this->uri->setScheme('https');
413 413
             }
414
-        } elseif (! is_cli()) {
414
+        } elseif (!is_cli()) {
415 415
             // @codeCoverageIgnoreStart
416 416
             exit('You have an empty or invalid base URL. The baseURL value must be set in Config\App.php, or through the .env file.');
417 417
             // @codeCoverageIgnoreEnd
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
     {
443 443
         // If it's not a valid locale, set it
444 444
         // to the default locale for the site.
445
-        if (! in_array($locale, $this->validLocales, true)) {
445
+        if (!in_array($locale, $this->validLocales, true)) {
446 446
             $locale = $this->defaultLocale;
447 447
         }
448 448
 
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
         helper('array');
539 539
 
540 540
         $json = $this->getJSON(true);
541
-        if (! is_array($json)) {
541
+        if (!is_array($json)) {
542 542
             return null;
543 543
         }
544 544
         $data = dot_array_search($index, $json);
@@ -547,14 +547,14 @@  discard block
 block discarded – undo
547 547
             return null;
548 548
         }
549 549
 
550
-        if (! is_array($data)) {
550
+        if (!is_array($data)) {
551 551
             $filter = $filter ?? FILTER_DEFAULT;
552 552
             $flags  = is_array($flags) ? $flags : (is_numeric($flags) ? (int) $flags : 0);
553 553
 
554 554
             return filter_var($data, $filter, $flags);
555 555
         }
556 556
 
557
-        if (! $assoc) {
557
+        if (!$assoc) {
558 558
             return json_decode(json_encode($data));
559 559
         }
560 560
 
Please login to merge, or discard this patch.
brighty/system/HTTP/ResponseTrait.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -152,13 +152,13 @@  discard block
 block discarded – undo
152 152
         }
153 153
 
154 154
         // Unknown and no message?
155
-        if (! array_key_exists($code, static::$statusCodes) && empty($reason)) {
155
+        if (!array_key_exists($code, static::$statusCodes) && empty($reason)) {
156 156
             throw HTTPException::forUnkownStatusCode($code);
157 157
         }
158 158
 
159 159
         $this->statusCode = $code;
160 160
 
161
-        $this->reason = ! empty($reason) ? $reason : static::$statusCodes[$code];
161
+        $this->reason = !empty($reason) ? $reason : static::$statusCodes[$code];
162 162
 
163 163
         return $this;
164 164
     }
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     public function setContentType(string $mime, string $charset = 'UTF-8')
223 223
     {
224 224
         // add charset attribute if not already there and provided as parm
225
-        if ((strpos($mime, 'charset=') < 1) && ! empty($charset)) {
225
+        if ((strpos($mime, 'charset=') < 1) && !empty($charset)) {
226 226
             $mime .= '; charset=' . $charset;
227 227
         }
228 228
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         $this->setContentType($mime);
315 315
 
316 316
         // Nothing much to do for a string...
317
-        if (! is_string($body) || $format === 'json-unencoded') {
317
+        if (!is_string($body) || $format === 'json-unencoded') {
318 318
             $body = Services::format()->getFormatter($mime)->format($body);
319 319
         }
320 320
 
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 
461 461
         // Per spec, MUST be sent with each request, if possible.
462 462
         // http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
463
-        if (! isset($this->headers['Date']) && PHP_SAPI !== 'cli-server') {
463
+        if (!isset($this->headers['Date']) && PHP_SAPI !== 'cli-server') {
464 464
             $this->setDate(DateTime::createFromFormat('U', (string) time()));
465 465
         }
466 466
 
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
             }
671 671
         }
672 672
 
673
-        if (! $found) {
673
+        if (!$found) {
674 674
             $this->setCookie($name, '', '', $domain, $path, $prefix);
675 675
         }
676 676
 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
         $request = Services::request();
706 706
 
707 707
         foreach ($this->cookieStore->display() as $cookie) {
708
-            if ($cookie->isSecure() && ! $request->isSecure()) {
708
+            if ($cookie->isSecure() && !$request->isSecure()) {
709 709
                 throw SecurityException::forDisallowedAction();
710 710
             }
711 711
 
Please login to merge, or discard this patch.
brighty/system/HTTP/Response.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         $config->cookieSameSite = $config->cookieSameSite ?? Cookie::SAMESITE_LAX;
169 169
 
170
-        if (! in_array(strtolower($config->cookieSameSite ?: Cookie::SAMESITE_LAX), Cookie::ALLOWED_SAMESITE_VALUES, true)) {
170
+        if (!in_array(strtolower($config->cookieSameSite ?: Cookie::SAMESITE_LAX), Cookie::ALLOWED_SAMESITE_VALUES, true)) {
171 171
             throw CookieException::forInvalidSameSite($config->cookieSameSite);
172 172
         }
173 173
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     public function getReasonPhrase()
249 249
     {
250 250
         if ($this->reason === '') {
251
-            return ! empty($this->statusCode) ? static::$statusCodes[$this->statusCode] : '';
251
+            return !empty($this->statusCode) ? static::$statusCodes[$this->statusCode] : '';
252 252
         }
253 253
 
254 254
         return $this->reason;
Please login to merge, or discard this patch.
brighty/system/HTTP/URI.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
     public static function createURIString(?string $scheme = null, ?string $authority = null, ?string $path = null, ?string $query = null, ?string $fragment = null): string
148 148
     {
149 149
         $uri = '';
150
-        if (! empty($scheme)) {
150
+        if (!empty($scheme)) {
151 151
             $uri .= $scheme . '://';
152 152
         }
153 153
 
154
-        if (! empty($authority)) {
154
+        if (!empty($authority)) {
155 155
             $uri .= $authority;
156 156
         }
157 157
 
@@ -333,13 +333,13 @@  discard block
 block discarded – undo
333 333
 
334 334
         $authority = $this->host;
335 335
 
336
-        if (! empty($this->getUserInfo())) {
336
+        if (!empty($this->getUserInfo())) {
337 337
             $authority = $this->getUserInfo() . '@' . $authority;
338 338
         }
339 339
 
340 340
         // Don't add port if it's a standard port for
341 341
         // this scheme
342
-        if (! empty($this->port) && ! $ignorePort && $this->port !== $this->defaultPorts[$this->scheme]) {
342
+        if (!empty($this->port) && !$ignorePort && $this->port !== $this->defaultPorts[$this->scheme]) {
343 343
             $authority .= ':' . $this->port;
344 344
         }
345 345
 
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
     {
373 373
         $userInfo = $this->user;
374 374
 
375
-        if ($this->showPassword === true && ! empty($this->password)) {
375
+        if ($this->showPassword === true && !empty($this->password)) {
376 376
             $userInfo .= ':' . $this->password;
377 377
         }
378 378
 
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
         $vars = $this->query;
469 469
 
470 470
         if (array_key_exists('except', $options)) {
471
-            if (! is_array($options['except'])) {
471
+            if (!is_array($options['except'])) {
472 472
                 $options['except'] = [$options['except']];
473 473
             }
474 474
 
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
         } elseif (array_key_exists('only', $options)) {
479 479
             $temp = [];
480 480
 
481
-            if (! is_array($options['only'])) {
481
+            if (!is_array($options['only'])) {
482 482
                 $options['only'] = [$options['only']];
483 483
             }
484 484
 
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
         // but we still have to deal with a zero-based array.
526 526
         $number--;
527 527
 
528
-        if ($number > count($this->segments) && ! $this->silent) {
528
+        if ($number > count($this->segments) && !$this->silent) {
529 529
             throw HTTPException::forURISegmentOutOfRange($number);
530 530
         }
531 531
 
@@ -619,7 +619,7 @@  discard block
 block discarded – undo
619 619
     {
620 620
         $parts = parse_url($str);
621 621
 
622
-        if (! isset($parts['path'])) {
622
+        if (!isset($parts['path'])) {
623 623
             $parts['path'] = $this->getPath();
624 624
         }
625 625
 
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
         }
757 757
 
758 758
         // Can't have leading ?
759
-        if (! empty($query) && strpos($query, '?') === 0) {
759
+        if (!empty($query) && strpos($query, '?') === 0) {
760 760
             $query = substr($query, 1);
761 761
         }
762 762
 
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
         $temp = [];
826 826
 
827 827
         foreach ($this->query as $key => $value) {
828
-            if (! in_array($key, $params, true)) {
828
+            if (!in_array($key, $params, true)) {
829 829
                 continue;
830 830
             }
831 831
 
@@ -878,7 +878,7 @@  discard block
 block discarded – undo
878 878
         // Encode characters
879 879
         $path = preg_replace_callback(
880 880
             '/(?:[^' . static::CHAR_UNRESERVED . ':@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/',
881
-            static function (array $matches) {
881
+            static function(array $matches) {
882 882
                 return rawurlencode($matches[0]);
883 883
             },
884 884
             $path
@@ -892,19 +892,19 @@  discard block
 block discarded – undo
892 892
      */
893 893
     protected function applyParts(array $parts)
894 894
     {
895
-        if (! empty($parts['host'])) {
895
+        if (!empty($parts['host'])) {
896 896
             $this->host = $parts['host'];
897 897
         }
898
-        if (! empty($parts['user'])) {
898
+        if (!empty($parts['user'])) {
899 899
             $this->user = $parts['user'];
900 900
         }
901 901
         if (isset($parts['path']) && $parts['path'] !== '') {
902 902
             $this->path = $this->filterPath($parts['path']);
903 903
         }
904
-        if (! empty($parts['query'])) {
904
+        if (!empty($parts['query'])) {
905 905
             $this->setQuery($parts['query']);
906 906
         }
907
-        if (! empty($parts['fragment'])) {
907
+        if (!empty($parts['fragment'])) {
908 908
             $this->fragment = $parts['fragment'];
909 909
         }
910 910
 
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
         $transformed = clone $relative;
959 959
 
960 960
         // 5.2.2 Transform References in a non-strict method (no scheme)
961
-        if (! empty($relative->getAuthority())) {
961
+        if (!empty($relative->getAuthority())) {
962 962
             $transformed
963 963
                 ->setAuthority($relative->getAuthority())
964 964
                 ->setPath($relative->getPath())
@@ -1000,7 +1000,7 @@  discard block
 block discarded – undo
1000 1000
      */
1001 1001
     protected function mergePaths(self $base, self $reference): string
1002 1002
     {
1003
-        if (! empty($base->getAuthority()) && $base->getPath() === '') {
1003
+        if (!empty($base->getAuthority()) && $base->getPath() === '') {
1004 1004
             return '/' . ltrim($reference->getPath(), '/ ');
1005 1005
         }
1006 1006
 
@@ -1025,8 +1025,8 @@  discard block
 block discarded – undo
1025 1025
         $return = [];
1026 1026
         $query  = explode('&', $query);
1027 1027
 
1028
-        $params = array_map(static function (string $chunk) {
1029
-            return preg_replace_callback('/^(?<key>[^&=]+?)(?:\[[^&=]*\])?=(?<value>[^&=]+)/', static function (array $match) {
1028
+        $params = array_map(static function(string $chunk) {
1029
+            return preg_replace_callback('/^(?<key>[^&=]+?)(?:\[[^&=]*\])?=(?<value>[^&=]+)/', static function(array $match) {
1030 1030
                 return str_replace($match['key'], bin2hex($match['key']), $match[0]);
1031 1031
             }, urldecode($chunk));
1032 1032
         }, $query);
Please login to merge, or discard this patch.
brighty/system/HTTP/Message.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
     {
108 108
         $origName = $this->getHeaderName($name);
109 109
 
110
-        if (! array_key_exists($origName, $this->headers)) {
110
+        if (!array_key_exists($origName, $this->headers)) {
111 111
             return '';
112 112
         }
113 113
 
Please login to merge, or discard this patch.
brighty/system/HTTP/DownloadResponse.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
             $charset = $this->charset;
149 149
         }
150 150
 
151
-        if (! is_string($mime)) {
151
+        if (!is_string($mime)) {
152 152
             // Set the default MIME type to send
153 153
             $mime    = 'application/octet-stream';
154 154
             $charset = '';
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      */
274 274
     public function buildHeaders()
275 275
     {
276
-        if (! $this->hasHeader('Content-Type')) {
276
+        if (!$this->hasHeader('Content-Type')) {
277 277
             $this->setContentTypeByMimeType();
278 278
         }
279 279
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         $splFileObject = $this->file->openFile('rb');
315 315
 
316 316
         // Flush 1MB chunks of data
317
-        while (! $splFileObject->eof() && ($data = $splFileObject->fread(1048576)) !== false) {
317
+        while (!$splFileObject->eof() && ($data = $splFileObject->fread(1048576)) !== false) {
318 318
             echo $data;
319 319
         }
320 320
 
Please login to merge, or discard this patch.
brighty/system/HTTP/Files/FileCollection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             $el = $this->files;
118 118
 
119 119
             foreach ($segments as $segment) {
120
-                if (! array_key_exists($segment, $el)) {
120
+                if (!array_key_exists($segment, $el)) {
121 121
                     return false;
122 122
                 }
123 123
 
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
      */
164 164
     protected function createFileObject(array $array)
165 165
     {
166
-        if (! isset($array['name'])) {
166
+        if (!isset($array['name'])) {
167 167
             $output = [];
168 168
 
169 169
             foreach ($array as $key => $values) {
170
-                if (! is_array($values)) {
170
+                if (!is_array($values)) {
171 171
                     continue;
172 172
                 }
173 173
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
             foreach ($array as $field => $value) {
204 204
                 $pointer = &$output[$name];
205 205
 
206
-                if (! is_array($value)) {
206
+                if (!is_array($value)) {
207 207
                     $pointer[$field] = $value;
208 208
 
209 209
                     continue;
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
                     $pointer = &$stack[count($stack) - 1];
221 221
                     $pointer = &$pointer[$key];
222 222
                     $stack[] = &$pointer;
223
-                    if (! $iterator->hasChildren()) {
223
+                    if (!$iterator->hasChildren()) {
224 224
                         $pointer[$field] = $val;
225 225
                     }
226 226
                 }
Please login to merge, or discard this patch.