Completed
Push — master ( 5c01aa...2b4547 )
by Hiraku
9s
created
src/Prefetcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
                 continue;
71 71
             }
72 72
 
73
-            $destination = $cachedir . DIRECTORY_SEPARATOR . FileDownloaderDummy::getCacheKeyCompat($p, $url);
73
+            $destination = $cachedir.DIRECTORY_SEPARATOR.FileDownloaderDummy::getCacheKeyCompat($p, $url);
74 74
             if (file_exists($destination)) {
75 75
                 continue;
76 76
             }
Please login to merge, or discard this patch.
src/FetchRequest.php 1 patch
Doc Comments   +5 added lines patch added patch discarded remove patch
@@ -37,6 +37,11 @@
 block discarded – undo
37 37
         return $curlOpts;
38 38
     }
39 39
 
40
+    /**
41
+     * @param string $key
42
+     *
43
+     * @return resource
44
+     */
40 45
     private static function getCurl($key)
41 46
     {
42 47
         static $curlCache = array();
Please login to merge, or discard this patch.
src/ConfigFacade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
     private static function getPHPVersion()
29 29
     {
30 30
         if (defined('HHVM_VERSION')) {
31
-            return 'HHVM ' . HHVM_VERSION;
31
+            return 'HHVM '.HHVM_VERSION;
32 32
         }
33
-        return 'PHP ' . PHP_VERSION;
33
+        return 'PHP '.PHP_VERSION;
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
src/ParallelizedComposerRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@
 block discarded – undo
17 17
 
18 18
             $requests = array();
19 19
             $cachedir = $this->config->get('cache-repo-dir');
20
-            $cacheBase = $cachedir . DIRECTORY_SEPARATOR . strtr($this->baseUrl, ':/', '--');
20
+            $cacheBase = $cachedir.DIRECTORY_SEPARATOR.strtr($this->baseUrl, ':/', '--');
21 21
             foreach ($includes as $include => $metadata) {
22
-                $url = $this->baseUrl . '/' . str_replace('%hash%', $metadata['sha256'], $include);
23
-                $cacheKey = str_replace(array('%hash%','$'), '', $include);
22
+                $url = $this->baseUrl.'/'.str_replace('%hash%', $metadata['sha256'], $include);
23
+                $cacheKey = str_replace(array('%hash%', '$'), '', $include);
24 24
                 if ($this->cache->sha256($cacheKey) !== $metadata['sha256']) {
25
-                    $dest = $cacheBase . DIRECTORY_SEPARATOR . str_replace('/', '-', $cacheKey);
25
+                    $dest = $cacheBase.DIRECTORY_SEPARATOR.str_replace('/', '-', $cacheKey);
26 26
                     $requests[] = new CopyRequest($url, $dest, false, $this->io, $this->config);
27 27
                 }
28 28
             }
Please login to merge, or discard this patch.
src/BaseRequest.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -85,6 +85,9 @@  discard block
 block discarded – undo
85 85
         return $cache = false;
86 86
     }
87 87
 
88
+    /**
89
+     * @param string $url
90
+     */
88 91
     protected function getProxy($url)
89 92
     {
90 93
         if (isset($_SERVER['no_proxy'])) {
@@ -255,6 +258,9 @@  discard block
 block discarded – undo
255 258
         }
256 259
     }
257 260
 
261
+    /**
262
+     * @param string $key
263
+     */
258 264
     public function addParam($key, $val)
259 265
     {
260 266
         $this->query[$key] = $val;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 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();
@@ -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.
src/Plugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
         // load all classes
57 57
         foreach (self::$pluginClasses as $class) {
58
-            class_exists(__NAMESPACE__ . '\\' . $class);
58
+            class_exists(__NAMESPACE__.'\\'.$class);
59 59
         }
60 60
 
61 61
         $this->io = $io;
Please login to merge, or discard this patch.
src/CopyRequest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $this->destination = $destination;
83 83
         if (is_dir($destination)) {
84 84
             throw new FetchException(
85
-                'The file could not be written to ' . $destination . '. Directory exists.'
85
+                'The file could not be written to '.$destination.'. Directory exists.'
86 86
             );
87 87
         }
88 88
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $this->fp = fopen($destination, 'wb');
92 92
         if (!$this->fp) {
93 93
             throw new FetchException(
94
-                'The file could not be written to ' . $destination
94
+                'The file could not be written to '.$destination
95 95
             );
96 96
         }
97 97
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         if (!file_exists($targetdir)) {
103 103
             if (!mkdir($targetdir, 0775, true)) {
104 104
                 throw new FetchException(
105
-                    'The file could not be written to ' . $fileName
105
+                    'The file could not be written to '.$fileName
106 106
                 );
107 107
             }
108 108
         }
Please login to merge, or discard this patch.