diff --git a/src/GenericCollection.php b/src/GenericCollection.php index b8fb00f..e68c5d7 100644 --- a/src/GenericCollection.php +++ b/src/GenericCollection.php @@ -16,13 +16,13 @@ /** * @template T - * @implements IteratorAggregate - * @implements ArrayAccess + * @implements IteratorAggregate + * @implements ArrayAccess */ class GenericCollection implements IteratorAggregate, ArrayAccess, Countable { /** - * @var array + * @var array */ protected array $itemList = []; protected ?string $type; @@ -61,7 +61,7 @@ public function add(mixed $value): void * Retrieve an external iterator. * * @link http://php.net/manual/en/iteratoraggregate.getiterator.php - * @return ArrayIterator An instance of an object implementing Iterator or + * @return ArrayIterator An instance of an object implementing Iterator or * Traversable */ public function getIterator(): Iterator|Traversable @@ -70,7 +70,7 @@ public function getIterator(): Iterator|Traversable } /** - * @return array + * @return array */ public function getArray(): array { @@ -92,7 +92,7 @@ public function checkType($item): bool * Whether an offset exists. * * @link http://php.net/manual/en/arrayaccess.offsetexists.php - * @param int $offset

+ * @param int|string $offset

* An offset to check for. *

* @return boolean true on success or false on failure. @@ -109,7 +109,7 @@ public function offsetExists($offset): bool * Offset to retrieve. * * @link http://php.net/manual/en/arrayaccess.offsetget.php - * @param int $offset

+ * @param int|string $offset

* The offset to retrieve. *

* @return null|T @@ -123,7 +123,7 @@ public function offsetGet($offset): mixed * Offset to set. * * @link http://php.net/manual/en/arrayaccess.offsetset.php - * @param null|int $offset

+ * @param null|int|string $offset

* The offset to assign the value to. *

* @param T $value

@@ -144,7 +144,7 @@ public function offsetSet($offset, $value): void * Offset to unset. * * @link http://php.net/manual/en/arrayaccess.offsetunset.php - * @param int $offset

+ * @param int|string $offset

* The offset to unset. *

* @return void