Completed
Push — master ( a382b9...53d20e )
by Hiraku
02:48 queued 12s
created
src/BaseRequest.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -84,6 +84,9 @@
 block discarded – undo
84 84
         return $cache = false;
85 85
     }
86 86
 
87
+    /**
88
+     * @param string $url
89
+     */
87 90
     protected function getProxy($url)
88 91
     {
89 92
         if (isset($_SERVER['no_proxy'])) {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 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 {
@@ -142,14 +142,14 @@  discard block
 block discarded – undo
142 142
 
143 143
         // is github
144 144
         if (in_array($authKey, $githubDomains) && 'x-oauth-basic' === $auth['password']) {
145
-            $this->addHeader('authorization', 'token ' . $auth['username']);
145
+            $this->addHeader('authorization', 'token '.$auth['username']);
146 146
             $this->user = $this->pass = null;
147 147
             return;
148 148
         }
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();
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         if ($this->user) {
213 213
             $user = $this->user;
214 214
             $user .= self::ifOr($this->pass, ':');
215
-            $url .= $user . '@';
215
+            $url .= $user.'@';
216 216
         }
217 217
         $url .= self::ifOr($this->host);
218 218
         $url .= self::ifOr($this->port, ':');
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
     private static function ifOr($str, $pre = '', $post = '')
248 248
     {
249 249
         if ($str) {
250
-            return $pre . $str . $post;
250
+            return $pre.$str.$post;
251 251
         }
252 252
         return '';
253 253
     }
Please login to merge, or discard this patch.