Skip to content

Commit 9adb1dc

Browse files
committed
level 5
1 parent b462f6d commit 9adb1dc

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

phpstan.neon

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ includes:
44
- phpstan-baseline.neon
55

66
parameters:
7-
level: 4
7+
level: 5
88
paths:
99
- src
1010
- tests/models/

src/Contracts/NodeQueryBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* @method int max(string $column)
2424
* @method NodeQueryBuilder where(string|array|\Closure $column, mixed $operator = null, mixed $value = null, string $boolean = 'and')
2525
* @method NodeModel|null first(array|string $columns = ['*'])
26-
* @method NodeModel findOrFail(array|string $columns = ['*'])
26+
* @method NodeModel findOrFail(int|string $id)
2727
* @method NodeQueryBuilder skip(int $value)
2828
* @method NodeQueryBuilder take(int $value)
2929
* @method NodeQueryBuilder orderBy(string $column, string $direction = 'asc')

src/NodeTrait.php

+5-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Carbon\Carbon;
66
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
77
use Illuminate\Database\Eloquent\Collection as EloquentCollection;
8-
use Illuminate\Database\Eloquent\Model;
98
use Illuminate\Database\Eloquent\Relations\BelongsTo;
109
use Illuminate\Database\Eloquent\Relations\HasMany;
1110
use Illuminate\Database\Eloquent\Relations\Relation;
@@ -181,7 +180,7 @@ protected function actionAppendOrPrepend(Node $parent, $prepend = false)
181180
/**
182181
* Apply parent model.
183182
*
184-
* @param (Node&Tmodel)|null $value
183+
* @param Node|null $value
185184
*
186185
* @return $this
187186
*/
@@ -373,7 +372,7 @@ public function saveAsRoot(): bool
373372
/**
374373
* Append and save a node.
375374
*
376-
* @param Node&Tmodel $node
375+
* @param Node $node
377376
*
378377
* @return bool
379378
*/
@@ -398,7 +397,7 @@ public function prependNode(Node $node): bool
398397
/**
399398
* Append a node to the new parent.
400399
*
401-
* @param Node&Tmodel $parent
400+
* @param Node $parent
402401
*
403402
* @return self
404403
*/
@@ -425,7 +424,7 @@ public function prependToNode(Node $parent): Node
425424
*
426425
* @return self
427426
*/
428-
public function appendOrPrependTo(Node $parent, bool $prepend = false): self
427+
protected function appendOrPrependTo(Node $parent, bool $prepend = false): self
429428
{
430429
$this->assertNodeExists($parent)
431430
->assertNotDescendant($parent)
@@ -461,7 +460,7 @@ public function beforeNode(Node $node)
461460
}
462461

463462
/**
464-
* @param Node&Tmodel $node
463+
* @param Node $node
465464
* @param bool $after
466465
*
467466
* @return Node

0 commit comments

Comments
 (0)