Skip to content

Commit 78ba71c

Browse files
committed
SCON-460: Fix PHPStan errors in Feature_Resource and Collection
- Remove unused Cast import from Feature_Resource - Add missing generic type annotations to Collection constructor
1 parent 6c3ed64 commit 78ba71c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Harbor/Utils/Collection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ class Collection implements ArrayAccess, IteratorAggregate, Countable {
3434
*
3535
* @since 1.0.0
3636
*
37-
* @param Traversable|array<string, TValue> $items An array or traversable of items.
37+
* @param Traversable<string, TValue>|array<string, TValue> $items An array or traversable of items.
3838
*
3939
* @return void
4040
*/
4141
public function __construct( $items = [] ) {
4242
if ( $items instanceof Traversable ) {
43+
/** @var array<string, TValue> $items */
4344
$items = iterator_to_array( $items );
4445
}
4546

0 commit comments

Comments
 (0)