Passed
Push — main ( 28baaa...23dfd3 )
by Dimitri
04:57
created
src/Http/Uri.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -149,12 +149,12 @@  discard block
 block discarded – undo
149 149
 
150 150
         $authority = $this->host;
151 151
 
152
-        if (! empty($this->getUserInfo())) {
152
+        if (!empty($this->getUserInfo())) {
153 153
             $authority = $this->getUserInfo() . '@' . $authority;
154 154
         }
155 155
 
156 156
         // N'ajoute pas de port s'il s'agit d'un port standard pour ce schéma
157
-        if (! empty($this->port) && ! $ignorePort && $this->port !== $this->defaultPorts[$this->scheme]) {
157
+        if (!empty($this->port) && !$ignorePort && $this->port !== $this->defaultPorts[$this->scheme]) {
158 158
             $authority .= ':' . $this->port;
159 159
         }
160 160
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     {
171 171
         $userInfo = $this->user ?: '';
172 172
 
173
-        if ($this->showPassword === true && ! empty($this->password)) {
173
+        if ($this->showPassword === true && !empty($this->password)) {
174 174
             $userInfo .= ':' . $this->password;
175 175
         }
176 176
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         $vars = $this->query;
221 221
 
222 222
         if (array_key_exists('except', $options)) {
223
-            if (! is_array($options['except'])) {
223
+            if (!is_array($options['except'])) {
224 224
                 $options['except'] = [$options['except']];
225 225
             }
226 226
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         } elseif (array_key_exists('only', $options)) {
231 231
             $temp = [];
232 232
 
233
-            if (! is_array($options['only'])) {
233
+            if (!is_array($options['only'])) {
234 234
                 $options['only'] = [$options['only']];
235 235
             }
236 236
 
@@ -344,11 +344,11 @@  discard block
 block discarded – undo
344 344
     public static function createURIString(?string $scheme = null, ?string $authority = null, ?string $path = null, ?string $query = null, ?string $fragment = null): string
345 345
     {
346 346
         $uri = '';
347
-        if (! empty($scheme)) {
347
+        if (!empty($scheme)) {
348 348
             $uri .= $scheme . '://';
349 349
         }
350 350
 
351
-        if (! empty($authority)) {
351
+        if (!empty($authority)) {
352 352
             $uri .= $authority;
353 353
         }
354 354
 
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
     {
377 377
         $parts = parse_url($str);
378 378
 
379
-        if (! isset($parts['path'])) {
379
+        if (!isset($parts['path'])) {
380 380
             $parts['path'] = $this->getPath();
381 381
         }
382 382
 
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
         }
550 550
 
551 551
         // Ne peut pas avoir de début ?
552
-        if (! empty($query) && str_starts_with($query, '?')) {
552
+        if (!empty($query) && str_starts_with($query, '?')) {
553 553
             $query = substr($query, 1);
554 554
         }
555 555
 
@@ -625,7 +625,7 @@  discard block
 block discarded – undo
625 625
         $temp = [];
626 626
 
627 627
         foreach ($this->query as $key => $value) {
628
-            if (! in_array($key, $params, true)) {
628
+            if (!in_array($key, $params, true)) {
629 629
                 continue;
630 630
             }
631 631
 
@@ -700,19 +700,19 @@  discard block
 block discarded – undo
700 700
      */
701 701
     protected function applyParts(array $parts)
702 702
     {
703
-        if (! empty($parts['host'])) {
703
+        if (!empty($parts['host'])) {
704 704
             $this->host = $parts['host'];
705 705
         }
706
-        if (! empty($parts['user'])) {
706
+        if (!empty($parts['user'])) {
707 707
             $this->user = $parts['user'];
708 708
         }
709
-        if (! empty($parts['path'])) {
709
+        if (!empty($parts['path'])) {
710 710
             $this->path = $this->filterPath($parts['path']);
711 711
         }
712
-        if (! empty($parts['query'])) {
712
+        if (!empty($parts['query'])) {
713 713
             $this->setQuery($parts['query']);
714 714
         }
715
-        if (! empty($parts['fragment'])) {
715
+        if (!empty($parts['fragment'])) {
716 716
             $this->fragment = $parts['fragment'];
717 717
         }
718 718
 
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
         $transformed = clone $relative;
761 761
 
762 762
         // 5.2.2 Transformer les références dans une méthode non stricte (pas de schéma)
763
-        if (! empty($relative->getAuthority())) {
763
+        if (!empty($relative->getAuthority())) {
764 764
             $transformed->setAuthority($relative->getAuthority())
765 765
                 ->setPath($relative->getPath())
766 766
                 ->setQuery($relative->getQuery());
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
      */
801 801
     protected function mergePaths(self $base, self $reference): string
802 802
     {
803
-        if (! empty($base->getAuthority()) && '' === $base->getPath()) {
803
+        if (!empty($base->getAuthority()) && '' === $base->getPath()) {
804 804
             return '/' . ltrim($reference->getPath(), '/ ');
805 805
         }
806 806
 
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
             $basePath = trim($baseUri->getPath(), '/') . '/';
884 884
             $trimPath = ltrim($path, '/');
885 885
 
886
-            if ($basePath !== '/' && ! str_starts_with($trimPath, $basePath)) {
886
+            if ($basePath !== '/' && !str_starts_with($trimPath, $basePath)) {
887 887
                 $path = $basePath . $trimPath;
888 888
             }
889 889
 
Please login to merge, or discard this patch.