22namespace TYPO3\CMS\Extbase\Persistence;
33
44/**
5+ * @template TKey of object
56 * @template TEntity of object
6- * @implements \ArrayAccess<string, TEntity>
7- * @implements \Iterator<string, TEntity>
87 * @phpstan-type ObjectStorageInternal array{obj: TEntity, inf: mixed}
8+ * @implements \ArrayAccess<TKey, TEntity>
9+ * @implements \Iterator<TKey, TEntity>
910 */
10- class ObjectStorage implements \Iterator, \ArrayAccess
11+ class ObjectStorage implements \Countable, \ Iterator, \ArrayAccess, ObjectMonitoringInterface
1112{
1213 /**
1314 * @var array<string, ObjectStorageInternal>
1415 */
1516 protected array $storage;
1617
1718 /**
18- * @param TEntity $object
19- * @param mixed $information
19+ * @phpstan- param TEntity $offset
20+ * @param ObjectStorageInternal $information
2021 */
21- public function offsetSet(mixed $object , mixed $information);
22+ public function offsetSet(mixed $offset , mixed $information): void ;
2223
2324 /**
2425 * @param TEntity|int $value
@@ -29,11 +30,11 @@ class ObjectStorage implements \Iterator, \ArrayAccess
2930 /**
3031 * @param TEntity|int $value
3132 */
32- public function offsetUnset(mixed $value);
33+ public function offsetUnset(mixed $value): void ;
3334
3435 /**
3536 * @param TEntity|int $value
36- * @return ($value is int ? TEntity|null : mixed )
37+ * @return ($value is int ? TEntity|null : ObjectStorageInternal )
3738 */
3839 public function offsetGet(mixed $value);
3940}
0 commit comments