1
0
Fork 0

Improve IDE autocompletion

According to type 2nd constructor-argument `$reasonData` can either be a Link or a PackageInterface. IDEs like PhpStorm won't be able to provide autocompletion since both classes are from a different namespace.

In order to provide better autocompletion for `$reasonData` and by extension `$this->reasonData` the use statements should be included or the type hint should use the fully qualified class name.

For the same reason I added the docblock on the protected method `formatePackagesUnique()`.
pull/6588/head
Denis Brumann 2017-08-04 13:00:24 +02:00 committed by GitHub
parent 189ba423ae
commit 2df1a69287
1 changed files with 8 additions and 0 deletions

View File

@ -13,6 +13,8 @@
namespace Composer\DependencyResolver;
use Composer\Package\CompletePackage;
use Composer\Package\Link;
use Composer\Package\PackageInterface;
/**
* @author Nils Adermann <naderman@naderman.de>
@ -235,6 +237,12 @@ abstract class Rule
}
}
/**
* @param Pool $pool
* @param array $packages
*
* @return string
*/
protected function formatPackagesUnique($pool, array $packages)
{
$prepared = array();