From 965a60ef147d9b57dcc764239779d0c5224e702c Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Thu, 8 Dec 2022 15:43:05 +0100 Subject: [PATCH 1/2] Rely on inherit doc --- src/ArrayCollection.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ArrayCollection.php b/src/ArrayCollection.php index b11b2a74..d81027d7 100644 --- a/src/ArrayCollection.php +++ b/src/ArrayCollection.php @@ -296,7 +296,9 @@ public function getValues() return array_values($this->elements); } - /** @return int */ + /** + * {@inheritDoc} + */ #[ReturnTypeWillChange] public function count() { From e70d9e752e8ca530820ec52c07bcf0f4015dff38 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Thu, 8 Dec 2022 17:59:23 +0100 Subject: [PATCH 2/2] Still keep @return to avoid deprecation --- src/ArrayCollection.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ArrayCollection.php b/src/ArrayCollection.php index d81027d7..d8c569a8 100644 --- a/src/ArrayCollection.php +++ b/src/ArrayCollection.php @@ -298,6 +298,8 @@ public function getValues() /** * {@inheritDoc} + * + * @return int<0, max> */ #[ReturnTypeWillChange] public function count()