@@ -37,8 +37,8 @@ public function linkNodes()
37
37
$ node ->setRelation ('parent ' , null );
38
38
}
39
39
40
- /** @var array<int,NodeModel> */
41
- $ children = $ groupedNodes ->get ($ node ->getKey (), []);
40
+ /** @var array<int,NodeModel> */
41
+ $ children = $ groupedNodes ->get ($ node ->getKey (), []); /** @phpstan-ignore varTag.type */
42
42
43
43
foreach ($ children as $ child ) {
44
44
$ child ->setRelation ('parent ' , $ node );
@@ -137,7 +137,7 @@ public function toFlatTree($root = false): Collection
137
137
/** @var NodeModel */
138
138
$ first = $ this ->first ();
139
139
/** @var Collection<NodeModel> */
140
- $ groupedNodes = $ this ->groupBy ($ first ->getParentIdName ());
140
+ $ groupedNodes = $ this ->groupBy ($ first ->getParentIdName ()); /** @phpstan-ignore varTag.type */
141
141
142
142
return $ result ->flattenTree ($ groupedNodes , $ this ->getRootNodeId ($ root )); /** @phpstan-ignore-line */
143
143
}
@@ -153,7 +153,7 @@ public function toFlatTree($root = false): Collection
153
153
protected function flattenTree (Collection $ groupedNodes , $ parentId ): Collection
154
154
{
155
155
/** @var array<int,NodeModel> */
156
- $ nodes = $ groupedNodes ->get ($ parentId , []);
156
+ $ nodes = $ groupedNodes ->get ($ parentId , []); /** @phpstan-ignore varTag.type */
157
157
foreach ($ nodes as $ node ) {
158
158
$ this ->push ($ node );
159
159
0 commit comments