From 3819b02fea44a29be97cf9ebdf668114352b7369 Mon Sep 17 00:00:00 2001 From: Markus Staab <47448731+clxmstaab@users.noreply.github.com> Date: Tue, 14 Apr 2020 22:05:58 +0200 Subject: [PATCH] added phpstan types to `CompletePackageInterface` (#8782) --- .../Package/CompletePackageInterface.php | 19 +++++++++++-------- src/Composer/Package/PackageInterface.php | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Composer/Package/CompletePackageInterface.php b/src/Composer/Package/CompletePackageInterface.php index 7782886d3..01e5f65cd 100644 --- a/src/Composer/Package/CompletePackageInterface.php +++ b/src/Composer/Package/CompletePackageInterface.php @@ -22,30 +22,30 @@ interface CompletePackageInterface extends PackageInterface /** * Returns the scripts of this package * - * @return array array('script name' => array('listeners')) + * @return array[] array('script name' => array('listeners')) + * @psalm-return array */ public function getScripts(); /** * Returns an array of repositories * - * {"": {}} - * - * @return array Repositories + * @return array[] Repositories + * @psalm-return array */ public function getRepositories(); /** * Returns the package license, e.g. MIT, BSD, GPL * - * @return array The package licenses + * @return string[] The package licenses */ public function getLicense(); /** * Returns an array of keywords relating to the package * - * @return array + * @return string[] */ public function getKeywords(); @@ -68,7 +68,8 @@ interface CompletePackageInterface extends PackageInterface * * Each item can contain name/homepage/email keys * - * @return array + * @return array[] + * @psalm-return array */ public function getAuthors(); @@ -76,6 +77,7 @@ interface CompletePackageInterface extends PackageInterface * Returns the support information * * @return array + * @psalm-return array */ public function getSupport(); @@ -84,7 +86,8 @@ interface CompletePackageInterface extends PackageInterface * * Each item will contain type and url keys * - * @return array + * @return array[] + * @psalm-return array */ public function getFunding(); diff --git a/src/Composer/Package/PackageInterface.php b/src/Composer/Package/PackageInterface.php index 63ba58fdf..18f72960f 100644 --- a/src/Composer/Package/PackageInterface.php +++ b/src/Composer/Package/PackageInterface.php @@ -124,7 +124,7 @@ interface PackageInterface /** * Returns the repository urls of this package including mirrors, e.g. git://github.com/naderman/composer.git * - * @return array + * @return string[] */ public function getSourceUrls();