1 | <?php |
||||
2 | |||||
3 | declare(strict_types=1); |
||||
4 | |||||
5 | namespace Umbrellio\LTree\Relations; |
||||
6 | |||||
7 | use Illuminate\Database\Eloquent\Builder; |
||||
8 | use Illuminate\Database\Eloquent\Model; |
||||
9 | use Umbrellio\LTree\Interfaces\LTreeModelInterface; |
||||
10 | use Umbrellio\LTree\Traits\LTreeModelTrait; |
||||
11 | |||||
12 | class BelongsToDescendantsTree extends AbstractBelongsToTree |
||||
13 | { |
||||
14 | /** |
||||
15 | * @param Builder|LTreeModelTrait|Model $query |
||||
16 | * @param Model|LTreeModelInterface $model |
||||
17 | */ |
||||
18 | 1 | protected function modifyQuery($query, Model $model): Builder |
|||
19 | { |
||||
20 | 1 | return $query->descendantsOf($model); |
|||
0 ignored issues
–
show
Bug
introduced
by
![]() The method
descendantsOf() does not exist on Illuminate\Database\Eloquent\Builder .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||
21 | } |
||||
22 | |||||
23 | 1 | protected function getOperator(): string |
|||
24 | { |
||||
25 | 1 | return '<@'; |
|||
26 | } |
||||
27 | } |
||||
28 |