Completed
Pull Request — master (#176)
by Markus
03:10 queued 01:16
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();
@@ -206,9 +206,9 @@  discard block
 block discarded – undo
206 206
             "gitlab.com",
207 207
             "repo.packagist.org"
208 208
         );
209
-        foreach($hostsWhichSupportHttp2 as $http2Host) {
209
+        foreach ($hostsWhichSupportHttp2 as $http2Host) {
210 210
             // http2 requires https
211
-            if (preg_match('{^https://'. preg_quote($http2Host) .'}i', $url)) {
211
+            if (preg_match('{^https://'.preg_quote($http2Host).'}i', $url)) {
212 212
                 $h2ServerSupported = true;
213 213
                 break;
214 214
             }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         if ($this->user) {
239 239
             $user = $this->user;
240 240
             $user .= self::ifOr($this->pass, ':');
241
-            $url .= $user . '@';
241
+            $url .= $user.'@';
242 242
         }
243 243
         $url .= self::ifOr($this->host);
244 244
         $url .= self::ifOr($this->port, ':');
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     private static function ifOr($str, $pre = '', $post = '')
274 274
     {
275 275
         if ($str) {
276
-            return $pre . $str . $post;
276
+            return $pre.$str.$post;
277 277
         }
278 278
         return '';
279 279
     }
Please login to merge, or discard this patch.