From be93148c08980d7cfc438b2a421decce6fcab8b3 Mon Sep 17 00:00:00 2001 From: Oliver Klee <typo3-coding@oliverklee.de> Date: Fri, 28 Apr 2023 16:33:23 +0200 Subject: [PATCH] [TASK] Make type annotations for ObjectStorage::toArray more specific This helps static analysis of projects using this class. Resolves: #100778 Releases: main, 11.5 Change-Id: I41cbf38477fb6743e5039dd9905ed38be81e96fc Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78915 Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php b/typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php index 78892692edde..912f43453f86 100644 --- a/typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php +++ b/typo3/sysext/extbase/Classes/Persistence/ObjectStorage.php @@ -309,7 +309,7 @@ class ObjectStorage implements \Countable, \Iterator, \ArrayAccess, ObjectMonito /** * Returns this object storage as an array * - * @return array The object storage + * @return list<TEntity> */ public function toArray() { @@ -326,7 +326,7 @@ class ObjectStorage implements \Countable, \Iterator, \ArrayAccess, ObjectMonito * for example dotted paths, e.g. ObjectAccess::getPropertyPath($object, 'children.array.123') * to get exactly the 123rd item in the "children" property which is an ObjectStorage. * - * @return array + * @return list<TEntity> */ public function getArray() { -- GitLab