Completed
Pull Request — master (#79)
by Christian
02:20
created
src/Factory.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * get cached curl handler
28 28
      * @param string $origin
29
-     * @return resource<curl>
29
+     * @return resource
30 30
      */
31 31
     public static function getConnection($origin)
32 32
     {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     /**
69 69
      * @param string $origin
70
-     * @param Composer\Config $config
70
+     * @param CConfig $config
71 71
      * @return string
72 72
      */
73 73
     private static function getRequestClass($origin, CConfig $config)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         if (substr($origin, -10) === 'github.com') {
51 51
             $origin = 'github.com';
52 52
         }
53
-        $requestClass = __NAMESPACE__ . '\Aspects\\' . self::getRequestClass($origin, $config) . 'Request';
53
+        $requestClass = __NAMESPACE__.'\Aspects\\'.self::getRequestClass($origin, $config).'Request';
54 54
         $request = new $requestClass($origin, $url, $io);
55 55
         $request->verbose = $pluginConfig['verbose'];
56 56
         if ($pluginConfig['insecure']) {
Please login to merge, or discard this patch.
src/Config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
     public function __construct(array $config)
27 27
     {
28 28
         $config += self::$default;
29
-        $schema = file_get_contents(__DIR__ . '/../res/config-schema.json');
29
+        $schema = file_get_contents(__DIR__.'/../res/config-schema.json');
30 30
         $validator = new JsonSchema\Validator;
31 31
         $validator->check((object)$config, json_decode($schema));
32 32
 
33
-        if (! $validator->isValid()) {
33
+        if (!$validator->isValid()) {
34 34
             throw new \InvalidArgumentException(var_export($validator->getErrors(), true));
35 35
         }
36 36
 
Please login to merge, or discard this patch.
src/CurlRemoteFilesystem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $that = $this; // for PHP5.3
69 69
 
70
-        return $this->fetch($origin, $fileUrl, $progress, $options, function ($ch, $request) use ($that, $fileName) {
70
+        return $this->fetch($origin, $fileUrl, $progress, $options, function($ch, $request) use ($that, $fileName) {
71 71
             $outputFile = new OutputFile($fileName);
72 72
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
73 73
             curl_setopt($ch, CURLOPT_FILE, $outputFile->getPointer());
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $that = $this; // for PHP5.3
100 100
 
101
-        return $this->fetch($origin, $fileUrl, $progress, $options, function ($ch, $request) use ($that) {
101
+        return $this->fetch($origin, $fileUrl, $progress, $options, function($ch, $request) use ($that) {
102 102
             // This order is important.
103 103
             curl_setopt($ch, CURLOPT_FILE, STDOUT);
104 104
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             $request->processRFSOption($options);
127 127
 
128 128
             if ($this->io->isDebug()) {
129
-                $this->io->write('Downloading ' . $fileUrl);
129
+                $this->io->write('Downloading '.$fileUrl);
130 130
             }
131 131
 
132 132
             if ($progress) {
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
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 
61 61
         // load all classes
62 62
         foreach (self::$pluginClasses as $class) {
63
-            class_exists(__NAMESPACE__ . '\\' . $class);
63
+            class_exists(__NAMESPACE__.'\\'.$class);
64 64
         }
65 65
 
66 66
         $this->config = $composer->getConfig();
Please login to merge, or discard this patch.
src/Aspects/HttpGetRequest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                     unset($headers[$i]);
124 124
                 }
125 125
             }
126
-            $headers[] = 'Authorization: Basic ' . base64_encode("$this->username:$this->password");
126
+            $headers[] = 'Authorization: Basic '.base64_encode("$this->username:$this->password");
127 127
         }
128 128
 
129 129
         $curlOpts = $this->curlOpts + array(
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         $ver = curl_version();
158 158
         if (preg_match('/^NSS.*Basic ECC$/', $ver['ssl_version'])) {
159 159
             $ciphers = array();
160
-            foreach (new \SplFileObject(__DIR__ . '/../../res/nss_ciphers.txt') as $line) {
160
+            foreach (new \SplFileObject(__DIR__.'/../../res/nss_ciphers.txt') as $line) {
161 161
                 $line = trim($line);
162 162
                 if ($line) {
163 163
                     $ciphers[] = $line;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $url .= $this->path;
184 184
 
185 185
         if ($this->query) {
186
-            $url .= '?' . http_build_query($this->query);
186
+            $url .= '?'.http_build_query($this->query);
187 187
         }
188 188
 
189 189
         return $url;
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         if ($ua) {
259 259
             return $ua;
260 260
         }
261
-        $phpVersion = defined('HHVM_VERSION') ? 'HHVM ' . HHVM_VERSION : 'PHP ' . PHP_VERSION;
261
+        $phpVersion = defined('HHVM_VERSION') ? 'HHVM '.HHVM_VERSION : 'PHP '.PHP_VERSION;
262 262
 
263 263
         return $ua = sprintf(
264 264
             'Composer/%s (%s; %s; %s)',
Please login to merge, or discard this patch.
src/Aspects/GitLabRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
     {
21 21
         parent::__construct($origin, $url, $io);
22 22
         if ($this->password === 'oauth2') {
23
-            $this->headers[] = 'Authorization: Bearer ' . $this->username;
23
+            $this->headers[] = 'Authorization: Bearer '.$this->username;
24 24
             // forbid basic-auth
25 25
             $this->username = $this->password = null;
26 26
         }
Please login to merge, or discard this patch.