@@ -154,7 +154,7 @@ |
||
| 154 | 154 | /** |
| 155 | 155 | * Returns package with given name if exists. |
| 156 | 156 | * @param string $name package name |
| 157 | - * @return \Composer\Package\PackageInterface|null |
|
| 157 | + * @return \Composer\Package\RootPackageInterface|PackageInterface|null |
|
| 158 | 158 | */ |
| 159 | 159 | public function findPackage($name) |
| 160 | 160 | { |
@@ -14,12 +14,10 @@ |
||
| 14 | 14 | use Composer\Composer; |
| 15 | 15 | use Composer\EventDispatcher\EventSubscriberInterface; |
| 16 | 16 | use Composer\Installer\InstallerEvent; |
| 17 | -use Composer\Installer\InstallerEvents; |
|
| 18 | 17 | use Composer\IO\IOInterface; |
| 19 | 18 | use Composer\Json\JsonFile; |
| 20 | 19 | use Composer\Package\PackageInterface; |
| 21 | 20 | use Composer\Plugin\CommandEvent; |
| 22 | -use Composer\Plugin\PluginEvents; |
|
| 23 | 21 | use Composer\Plugin\PluginInterface; |
| 24 | 22 | use Composer\Script\Event; |
| 25 | 23 | use Composer\Script\ScriptEvents; |
@@ -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); |
@@ -82,6 +82,9 @@ discard block |
||
| 82 | 82 | ); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | + /** |
|
| 86 | + * @param PackageInterface $package |
|
| 87 | + */ |
|
| 85 | 88 | public function packageFullName($package) |
| 86 | 89 | { |
| 87 | 90 | return $package->getName() . ':' . $package->getVersion(); |
@@ -263,7 +266,7 @@ discard block |
||
| 263 | 266 | |
| 264 | 267 | /** |
| 265 | 268 | * Prepares arguments and runs the command with [[passthru()]]. |
| 266 | - * @param array $arguments |
|
| 269 | + * @param string[] $arguments |
|
| 267 | 270 | * @return integer the exit code |
| 268 | 271 | */ |
| 269 | 272 | public function passthru(array $arguments = []) |