Skip to content

Commit

Permalink
refactor(base entity): add phpdoc for collectMany
Browse files Browse the repository at this point in the history
  • Loading branch information
021-projects committed Feb 5, 2024
1 parent a9b6a26 commit 22ff758
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/BaseEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public function __construct(array $props = [])
parent::__construct($props);
}

/**
* @param array $items
* @return \Illuminate\Support\Collection<static>
*/
public static function collectMany(array $items): Collection
{
return collect($items)->map(fn($item) => new static($item));
Expand Down

0 comments on commit 22ff758

Please sign in to comment.