@@ -33,6 +33,9 @@ |
||
33 | 33 | return static::$parser; |
34 | 34 | } |
35 | 35 | |
36 | + /** |
|
37 | + * @param string $constraint |
|
38 | + */ |
|
36 | 39 | static public function parse($constraint) |
37 | 40 | { |
38 | 41 | return static::getParser()->parseConstraints($constraint); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | } elseif ($acon->matches($bcon) || $bcon->matches($acon)) { |
58 | 58 | return strlen($a) > strlen($b) ? $b : $a; |
59 | 59 | } else { |
60 | - return $a . ' ' . $b; |
|
60 | + return $a.' '.$b; |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 |
@@ -97,6 +97,9 @@ discard block |
||
97 | 97 | return $this->name; |
98 | 98 | } |
99 | 99 | |
100 | + /** |
|
101 | + * @param PackageInterface $package |
|
102 | + */ |
|
100 | 103 | public function packageFullName($package) |
101 | 104 | { |
102 | 105 | return $package->getName() . ':' . $package->getVersion(); |
@@ -274,6 +277,9 @@ discard block |
||
274 | 277 | $this->writeJson($this->file, $this->config); |
275 | 278 | } |
276 | 279 | |
280 | + /** |
|
281 | + * @param string $path |
|
282 | + */ |
|
277 | 283 | abstract public function writeRc($path, $data); |
278 | 284 | |
279 | 285 | /** |
@@ -291,7 +297,7 @@ discard block |
||
291 | 297 | |
292 | 298 | /** |
293 | 299 | * Prepares arguments and runs the command with [[passthru()]]. |
294 | - * @param array $arguments |
|
300 | + * @param string[] $arguments |
|
295 | 301 | * @return integer the exit code |
296 | 302 | */ |
297 | 303 | public function passthru(array $arguments = []) |
@@ -357,6 +363,9 @@ discard block |
||
357 | 363 | return $this->name; |
358 | 364 | } |
359 | 365 | |
366 | + /** |
|
367 | + * @param string[] $parts |
|
368 | + */ |
|
360 | 369 | public static function buildPath($parts) |
361 | 370 | { |
362 | 371 | return implode(DIRECTORY_SEPARATOR, array_filter($parts)); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | public function packageFullName($package) |
101 | 101 | { |
102 | - return $package->getName() . ':' . $package->getVersion(); |
|
102 | + return $package->getName().':'.$package->getVersion(); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | public function setKnownDeps(PackageInterface $package, $type, $name, $constraint) |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $extra = $package->getExtra(); |
194 | 194 | $extra_deps = []; |
195 | 195 | foreach ($this->dependencies as $key) { |
196 | - $name = $this->name . '-' . $key; |
|
196 | + $name = $this->name.'-'.$key; |
|
197 | 197 | if (isset($extra[$name])) { |
198 | 198 | $extra_deps[$key] = $extra[$name]; |
199 | 199 | } |
@@ -258,8 +258,8 @@ discard block |
||
258 | 258 | */ |
259 | 259 | public function runAction($action) |
260 | 260 | { |
261 | - $doing = ucfirst(trim($action, 'e')) . 'ing'; |
|
262 | - $this->plugin->io->writeError('<info>' . $doing . ' ' . $this->name . ' dependencies...</info>'); |
|
261 | + $doing = ucfirst(trim($action, 'e')).'ing'; |
|
262 | + $this->plugin->io->writeError('<info>'.$doing.' '.$this->name.' dependencies...</info>'); |
|
263 | 263 | $this->saveConfigs(); |
264 | 264 | $this->perform($action); |
265 | 265 | } |
@@ -283,9 +283,9 @@ discard block |
||
283 | 283 | */ |
284 | 284 | protected function perform($action) |
285 | 285 | { |
286 | - $this->plugin->io->writeError('running ' . $this->getBin()); |
|
286 | + $this->plugin->io->writeError('running '.$this->getBin()); |
|
287 | 287 | if ($this->passthru([$action])) { |
288 | - $this->plugin->io->writeError('<error>failed ' . $this->name . ' ' . $action . '</error>'); |
|
288 | + $this->plugin->io->writeError('<error>failed '.$this->name.' '.$action.'</error>'); |
|
289 | 289 | } |
290 | 290 | } |
291 | 291 | |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | */ |
297 | 297 | public function passthru(array $arguments = []) |
298 | 298 | { |
299 | - passthru($this->getBin() . $this->prepareCommand($arguments), $exitCode); |
|
299 | + passthru($this->getBin().$this->prepareCommand($arguments), $exitCode); |
|
300 | 300 | return $exitCode; |
301 | 301 | } |
302 | 302 | |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | { |
310 | 310 | $result = ''; |
311 | 311 | foreach ($arguments as $a) { |
312 | - $result .= ' ' . escapeshellarg($a); |
|
312 | + $result .= ' '.escapeshellarg($a); |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | return $result; |
@@ -302,6 +302,9 @@ |
||
302 | 302 | return $this->vendorDir; |
303 | 303 | } |
304 | 304 | |
305 | + /** |
|
306 | + * @param Composer $composer |
|
307 | + */ |
|
305 | 308 | public function findVendorDir($composer) |
306 | 309 | { |
307 | 310 | return $composer->getConfig()->get('vendor-dir', '/'); |
@@ -238,7 +238,7 @@ |
||
238 | 238 | if ($rootPackage) { |
239 | 239 | $extra = $rootPackage->getExtra(); |
240 | 240 | foreach ($this->managers as $manager) { |
241 | - $var = $manager->getName() . '-asset-library'; |
|
241 | + $var = $manager->getName().'-asset-library'; |
|
242 | 242 | if (isset($extra['asset-installer-paths'][$var])) { |
243 | 243 | $manager->setDestination($extra['asset-installer-paths'][$var]); |
244 | 244 | } |