Skip to content

Commit

Permalink
Merge pull request #220 from func0der/viewmodel-getiterator-typehint
Browse files Browse the repository at this point in the history
Add return type hint to ViewModel::getIterator()
  • Loading branch information
gsteel authored Oct 17, 2023
2 parents 5164752 + 46c379a commit 6188b66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Model/ViewModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class ViewModel implements ModelInterface, ClearableModelInterface, RetrievableC
* Child models
*
* @var array
* @psalm-type list<ModelInterface>
*/
protected $children = [];

Expand Down Expand Up @@ -508,7 +509,7 @@ public function count()
/**
* Get iterator of children
*
* @return ArrayIterator
* @return Traversable<int, ModelInterface>
*/
#[ReturnTypeWillChange]
public function getIterator()
Expand Down

0 comments on commit 6188b66

Please sign in to comment.