From c1ec9823f9250fefb274cccf62970b5c167e6bc7 Mon Sep 17 00:00:00 2001 From: Fran Moreno Date: Mon, 7 Mar 2022 15:54:39 +0100 Subject: [PATCH] Psalm 4.22 and PHPStan 1.4.8 (#296) --- .gitattributes | 2 + composer.json | 4 +- .../Collections/AbstractLazyCollection.php | 9 ++-- .../Common/Collections/ArrayCollection.php | 9 ++-- psalm.xml.dist | 44 +++++-------------- 5 files changed, 24 insertions(+), 44 deletions(-) diff --git a/.gitattributes b/.gitattributes index e25cf4a73..eead063b2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,5 @@ .scrutinizer.yml export-ignore phpunit.xml.dist export-ignore /phpcs.xml.dist export-ignore +/phpstan.neon.dist export-ignore +/psalm.xml.dist export-ignore diff --git a/composer.json b/composer.json index ba12f2c8f..9365d7a1f 100644 --- a/composer.json +++ b/composer.json @@ -23,8 +23,8 @@ "require-dev": { "phpunit/phpunit": "^7.5 || ^8.5 || ^9.1.5", "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1", - "vimeo/psalm": "^4.2.1" + "phpstan/phpstan": "^1.4.8", + "vimeo/psalm": "^4.22" }, "autoload": { "psr-4": { "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" } diff --git a/lib/Doctrine/Common/Collections/AbstractLazyCollection.php b/lib/Doctrine/Common/Collections/AbstractLazyCollection.php index 19d86e619..fc661ea15 100644 --- a/lib/Doctrine/Common/Collections/AbstractLazyCollection.php +++ b/lib/Doctrine/Common/Collections/AbstractLazyCollection.php @@ -292,7 +292,7 @@ public function getIterator() } /** - * {@inheritDoc} + * @param TKey $offset * * @return bool */ @@ -305,7 +305,7 @@ public function offsetExists($offset) } /** - * {@inheritDoc} + * @param TKey $offset * * @return mixed */ @@ -318,7 +318,8 @@ public function offsetGet($offset) } /** - * {@inheritDoc} + * @param TKey|null $offset + * @param T $value * * @return void */ @@ -330,7 +331,7 @@ public function offsetSet($offset, $value) } /** - * {@inheritDoc} + * @param TKey $offset * * @return void */ diff --git a/lib/Doctrine/Common/Collections/ArrayCollection.php b/lib/Doctrine/Common/Collections/ArrayCollection.php index 059ff0fc0..40de04f5d 100644 --- a/lib/Doctrine/Common/Collections/ArrayCollection.php +++ b/lib/Doctrine/Common/Collections/ArrayCollection.php @@ -165,7 +165,7 @@ public function removeElement($element) /** * Required by interface ArrayAccess. * - * {@inheritDoc} + * @param TKey $offset * * @return bool */ @@ -178,7 +178,7 @@ public function offsetExists($offset) /** * Required by interface ArrayAccess. * - * {@inheritDoc} + * @param TKey $offset * * @return mixed */ @@ -191,7 +191,8 @@ public function offsetGet($offset) /** * Required by interface ArrayAccess. * - * {@inheritDoc} + * @param TKey|null $offset + * @param T $value * * @return void */ @@ -210,7 +211,7 @@ public function offsetSet($offset, $value) /** * Required by interface ArrayAccess. * - * {@inheritDoc} + * @param TKey $offset * * @return void */ diff --git a/psalm.xml.dist b/psalm.xml.dist index 3b5d11113..e54717882 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -1,6 +1,6 @@ - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + -