Skip to content

Commit fa8c71c

Browse files
committed
fix: use the correct return type for column
fix #124
1 parent f9fda2e commit fa8c71c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/CollectionInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function remove(mixed $element): bool;
8989
* @param string $propertyOrMethod The name of the property, method, or
9090
* array key to evaluate and return.
9191
*
92-
* @return array<int, mixed>
92+
* @return list<T>
9393
*
9494
* @throws InvalidPropertyOrMethod if the $propertyOrMethod does not exist
9595
* on the elements in this collection.

tests/types/collections.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
assertType('Ramsey\Collection\Collection<Ramsey\Collection\Test\Mock\Person>', $morePersons);
2323

2424
assertType(Person::class, $persons[0]);
25-
assertType('array<int, mixed>', $persons->column('name'));
25+
assertType('list<Ramsey\Collection\Test\Mock\Person>', $persons->column('name'));
2626
assertType(Person::class, $persons->first());
2727
assertType(Person::class, $persons->last());
2828
assertType(Person::class, $persons->offsetGet(0));

tests/types/sets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
assertType('Ramsey\Collection\Set<Ramsey\Collection\Test\Mock\Person>', $morePersons);
2323

2424
assertType(Person::class, $persons[0]);
25-
assertType('array<int, mixed>', $persons->column('name'));
25+
assertType('list<Ramsey\Collection\Test\Mock\Person>', $persons->column('name'));
2626
assertType(Person::class, $persons->first());
2727
assertType(Person::class, $persons->last());
2828
assertType(Person::class, $persons->offsetGet(0));

0 commit comments

Comments
 (0)