Skip to content

Commit

Permalink
Add phpdoc for generics in Collection (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
raustin-m authored May 18, 2023
1 parent 5bb0db5 commit 2b0c4bd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Eloquent/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

use Illuminate\Database\Eloquent\Collection as Base;

/**
* @template TKey of array-key
* @template TModel of \Illuminate\Database\Eloquent\Model
*
* @extends \Illuminate\Database\Eloquent\Collection<TKey, TModel>
*/
class Collection extends Base
{
public function toTree($childrenRelation = 'children')
Expand Down

0 comments on commit 2b0c4bd

Please sign in to comment.