Skip to content

Commit 9c86034

Browse files
update
1 parent 1a4f788 commit 9c86034

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Collections/CollectionTrait.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@
88
use Traversable;
99
use JsonSerializable;
1010
use Tamedevelopers\Support\Server;
11-
12-
/** @psalm-suppress UndefinedClass @phpstan-ignore-next-line */
1311
use Tamedevelopers\Database\Collections\Collection as DBCollection;
1412

1513

16-
/**
17-
* @var \Tamedevelopers\Database\Collections\Collection $items
18-
*/
1914
trait CollectionTrait{
2015

2116
/**

Tests/collection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@
5656
$iterator = $collection->getIterator();
5757
foreach ($iterator as $item) {
5858
// Process each item
59+
60+
dd(
61+
$item
62+
);
5963
}
6064

6165

stubs/DBCollection.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
if (!class_exists(Collection::class)) {
66
class Collection {
7+
/**
8+
* Stub method to simulate the actual method signature in the real class.
9+
*
10+
* @return array
11+
*/
712
public function toArray(): array {
813
// Stub implementation ensures a valid array is always returned
914
return [];

0 commit comments

Comments
 (0)