Skip to content

Commit 609c1e4

Browse files
committed
level 6
1 parent 5a2ae21 commit 609c1e4

File tree

5 files changed

+82
-78
lines changed

5 files changed

+82
-78
lines changed

phpstan.neon

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ parameters:
1414
- '#.*covariant.*#'
1515
- '#.*contravariant.*#'
1616
-
17-
message: '#^Call to an undefined method Kalnoy\\Nestedset\\Contracts\\Node::assert.*\(\)\.$#'
17+
message: '#^Call to an undefined method Kalnoy\\Nestedset\\Contracts\\Node<.*>::assert.*\(\)\.$#'

src/BaseRelation.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @phpstan-type NodeModel Node<Tmodel>&Tmodel
1818
*
19-
* @extends Relation<NodeModel,NodeModel,EloquentCollection<int,NodeModel>>
19+
* @extends Relation<NodeModel,NodeModel,NestedSetCollection<Tmodel>>
2020
*
2121
* @property NodeModel $related
2222
* @property NodeModel $parent

src/Contracts/Node.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Kalnoy\Nestedset\Contracts;
44

55
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
6-
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
76
use Illuminate\Database\Eloquent\Relations\BelongsTo;
87
use Illuminate\Database\Eloquent\Relations\HasMany;
98
use Illuminate\Database\Eloquent\Relations\Relation;
@@ -61,7 +60,7 @@ public function children(): HasMany;
6160
/**
6261
* Get query for descendants of the node.
6362
*
64-
* @return Relation<NodeModel,NodeModel,EloquentCollection<int,Node<Tmodel>&Tmodel>>
63+
* @return Relation<NodeModel,NodeModel,NestedSetCollection<Tmodel>>
6564
*/
6665
public function descendants(): Relation;
6766

@@ -119,7 +118,7 @@ public function prevNodes(): NodeQueryBuilder;
119118
/**
120119
* Get query ancestors of the node.
121120
*
122-
* @return Relation<NodeModel,NodeModel,EloquentCollection<int,Node<Tmodel>&Tmodel>>
121+
* @return Relation<NodeModel,NodeModel,NestedSetCollection<Tmodel>>
123122
*/
124123
public function ancestors(): Relation;
125124

0 commit comments

Comments
 (0)