Completed
Pull Request — master (#176)
by Markus
01:58
created
src/BaseRequest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 
101 101
         foreach (array('https', 'http') as $scheme) {
102 102
             if ($this->scheme === $scheme) {
103
-                $label = $scheme . '_proxy';
103
+                $label = $scheme.'_proxy';
104 104
                 foreach (array(strtoupper($label), $label) as $l) {
105 105
                     if (isset($_SERVER[$l])) {
106 106
                         return $_SERVER[$l];
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             if ($useRedirector) {
125 125
                 if ($this->host === 'api.github.com' && preg_match('%^/repos(/[^/]+/[^/]+/)zipball(.+)$%', $this->path, $_)) {
126 126
                     $this->host = 'codeload.github.com';
127
-                    $this->path = $_[1] . 'legacy.zip' . $_[2];
127
+                    $this->path = $_[1].'legacy.zip'.$_[2];
128 128
                 }
129 129
             }
130 130
         } else {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         // is gitlab
150 150
         if (in_array($authKey, $gitlabDomains)) {
151 151
             if ('oauth2' === $auth['password']) {
152
-                $this->addHeader('authorization', 'Bearer ' . $auth['username']);
152
+                $this->addHeader('authorization', 'Bearer '.$auth['username']);
153 153
                 $this->user = $this->pass = null;
154 154
                 return;
155 155
             }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     {
173 173
         $headers = array();
174 174
         foreach ($this->headers as $key => $val) {
175
-            $headers[] = strtr(ucwords(strtr($key, '-', ' ')), ' ', '-') . ': ' . $val;
175
+            $headers[] = strtr(ucwords(strtr($key, '-', ' ')), ' ', '-').': '.$val;
176 176
         }
177 177
 
178 178
         $url = $this->getURL();
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
             "packagist.org",
208 208
             "repo.packagist.org"
209 209
         );
210
-        foreach($hostsWhichSupportHttp2 as $http2Host) {
210
+        foreach ($hostsWhichSupportHttp2 as $http2Host) {
211 211
             // http2 requires https
212
-            if (preg_match('{^https://'. preg_quote($http2Host) .'}i', $url)) {
212
+            if (preg_match('{^https://'.preg_quote($http2Host).'}i', $url)) {
213 213
                 $h2ServerSupported = true;
214 214
                 break;
215 215
             }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         if ($this->user) {
237 237
             $user = $this->user;
238 238
             $user .= self::ifOr($this->pass, ':');
239
-            $url .= $user . '@';
239
+            $url .= $user.'@';
240 240
         }
241 241
         $url .= self::ifOr($this->host);
242 242
         $url .= self::ifOr($this->port, ':');
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     private static function ifOr($str, $pre = '', $post = '')
272 272
     {
273 273
         if ($str) {
274
-            return $pre . $str . $post;
274
+            return $pre.$str.$post;
275 275
         }
276 276
         return '';
277 277
     }
Please login to merge, or discard this patch.