Completed
Pull Request — master (#16)
by Sergii
04:39
created
src/Utils/Url.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         // Start with base URL when path is empty, or not starts from "//" or "http".
38 38
         if (empty($path) || strpos($path, '//') !== 0 && strpos($path, 'http') !== 0) {
39
-            $path = rtrim($baseUrl, '/') . '/' . trim($path, '/');
39
+            $path = rtrim($baseUrl, '/').'/'.trim($path, '/');
40 40
         }
41 41
 
42 42
         $this->setUrl($path)->scheme()->credentials()->host()->components();
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             throw new \InvalidArgumentException(sprintf('%s - invalid scheme.', $this->components['scheme']));
88 88
         }
89 89
 
90
-        $this->url = $this->components['scheme'] . '://';
90
+        $this->url = $this->components['scheme'].'://';
91 91
 
92 92
         return $this;
93 93
     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             // Encode special characters in username and password. Useful
104 104
             // when some item contain something like "@" symbol.
105 105
             foreach (['user' => ':', 'pass' => '@'] as $part => $suffix) {
106
-                $this->url .= rawurlencode($this->components[$part]) . $suffix;
106
+                $this->url .= rawurlencode($this->components[$part]).$suffix;
107 107
             }
108 108
         }
109 109
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     {
132 132
         foreach (['port' => ':', 'path' => '', 'query' => '?', 'fragment' => '#'] as $part => $prefix) {
133 133
             if (isset($this->components[$part])) {
134
-                $this->url .= $prefix . $this->components[$part];
134
+                $this->url .= $prefix.$this->components[$part];
135 135
             }
136 136
         }
137 137
 
Please login to merge, or discard this patch.