Skip to content

Commit 90114eb

Browse files
authored
Fixes PHP-notice
Without having int as return type, we will generate notices like ``` Return type of Spatie\LaravelData\DataCollection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/ahoi/test/vendor/spatie/laravel-data/src/DataCollection.php on line 104 ```
1 parent 5b1db07 commit 90114eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DataCollection.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function getIterator(): ArrayIterator
101101
return new ArrayIterator($this->transform(TransformationType::withoutValueTransforming()));
102102
}
103103

104-
public function count()
104+
public function count(): int
105105
{
106106
return count($this->items);
107107
}

0 commit comments

Comments
 (0)