diff --git a/src/Composer/Package/Archiver/ArchiveManager.php b/src/Composer/Package/Archiver/ArchiveManager.php index e354e4454..5e4ec0100 100644 --- a/src/Composer/Package/Archiver/ArchiveManager.php +++ b/src/Composer/Package/Archiver/ArchiveManager.php @@ -28,6 +28,9 @@ class ArchiveManager protected $downloadManager; protected $loop; + /** + * @var ArchiverInterface[] + */ protected $archivers = array(); /** diff --git a/src/Composer/Package/PackageInterface.php b/src/Composer/Package/PackageInterface.php index 4db9b45ee..63ba58fdf 100644 --- a/src/Composer/Package/PackageInterface.php +++ b/src/Composer/Package/PackageInterface.php @@ -47,7 +47,7 @@ interface PackageInterface * * @param bool $provides Whether provided names should be included * - * @return array An array of strings referring to this package + * @return string[] An array of strings referring to this package */ public function getNames($provides = true); @@ -159,7 +159,7 @@ interface PackageInterface /** * Returns the urls of the distribution archive of this version, including mirrors * - * @return array + * @return string[] */ public function getDistUrls(); @@ -270,6 +270,7 @@ interface PackageInterface * combination with this package. * * @return array An array of package suggestions with descriptions + * @psalm-return array */ public function getSuggests(); @@ -282,6 +283,7 @@ interface PackageInterface * directories for autoloading using the type specified. * * @return array Mapping of autoloading rules + * @psalm-return array{psr-0?: array, psr-4?: array, classmap?: list, file?: list} */ public function getAutoload(); @@ -294,6 +296,7 @@ interface PackageInterface * directories for autoloading using the type specified. * * @return array Mapping of dev autoloading rules + * @psalm-return array{psr-0?: array, psr-4?: array, classmap?: list, file?: list} */ public function getDevAutoload(); @@ -301,7 +304,7 @@ interface PackageInterface * Returns a list of directories which should get added to PHP's * include path. * - * @return array + * @return string[] */ public function getIncludePaths(); @@ -322,7 +325,7 @@ interface PackageInterface /** * Returns the package binaries * - * @return array + * @return string[] */ public function getBinaries(); diff --git a/src/Composer/Repository/RepositoryInterface.php b/src/Composer/Repository/RepositoryInterface.php index 98b616fa0..0ff6168f0 100644 --- a/src/Composer/Repository/RepositoryInterface.php +++ b/src/Composer/Repository/RepositoryInterface.php @@ -69,7 +69,9 @@ interface RepositoryInterface extends \Countable * @param ConstraintInterface[] $packageNameMap package names pointing to constraints * @param array $acceptableStabilities * @param array $stabilityFlags + * * @return array [namesFound => string[], packages => PackageInterface[]] + * @psalm-return array{namesFound: string[], packages: PackageInterface[]} */ public function loadPackages(array $packageNameMap, array $acceptableStabilities, array $stabilityFlags); @@ -81,6 +83,7 @@ interface RepositoryInterface extends \Countable * @param string $type The type of package to search for. Defaults to all types of packages * * @return array[] an array of array('name' => '...', 'description' => '...') + * @psalm-return list */ public function search($query, $mode = 0, $type = null); @@ -92,6 +95,7 @@ interface RepositoryInterface extends \Countable * @param string $packageName package name which must be provided * * @return array[] an array with the provider name as key and value of array('name' => '...', 'description' => '...', 'type' => '...') + * @psalm-return array */ public function getProviders($packageName);