Skip to content

Commit e6e9986

Browse files
authored
add missing methods used in Lychee as phpdocs (#17)
1 parent 8d96dbe commit e6e9986

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

phpstan-baseline.neon

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
parameters:
22
ignoreErrors:
33

4-
-
5-
message: '#^Call to an undefined method Kalnoy\\Nestedset\\Contracts\\NodeQueryBuilder\<Tmodel of Illuminate\\Database\\Eloquent\\Model\>\:\:whereIn\(\)\.$#'
6-
identifier: method.notFound
7-
count: 1
8-
path: src/QueryBuilder.php
4+
# -
5+
# message: '#^Call to an undefined method Kalnoy\\Nestedset\\Contracts\\NodeQueryBuilder\<Tmodel of Illuminate\\Database\\Eloquent\\Model\>\:\:whereIn\(\)\.$#'
6+
# identifier: method.notFound
7+
# count: 1
8+
# path: src/QueryBuilder.php
99

10-
-
11-
message: '#^Dynamic call to static method Kalnoy\\Nestedset\\QueryBuilder\<Tmodel of Illuminate\\Database\\Eloquent\\Model\>\:\:whereRaw\(\)\.$#'
12-
identifier: staticMethod.dynamicCall
13-
count: 1
14-
path: src/QueryBuilder.php
10+
# -
11+
# message: '#^Dynamic call to static method Kalnoy\\Nestedset\\QueryBuilder\<Tmodel of Illuminate\\Database\\Eloquent\\Model\>\:\:whereRaw\(\)\.$#'
12+
# identifier: staticMethod.dynamicCall
13+
# count: 1
14+
# path: src/QueryBuilder.php
1515

src/Contracts/NestedSetCollection.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
*
1010
* @require-extends \Illuminate\Database\Eloquent\Collection
1111
*
12-
* @method NestedSetCollection<NodeModel> groupBy(string $column)
13-
* @method array<int,NodeModel> all()
12+
* @method NestedSetCollection<NodeModel> groupBy(string $column)
13+
* @method array<int,NodeModel> all()
14+
* @method \Illuminate\Support\Collection<array-key,NodeModel> toBase()
1415
*/
1516
interface NestedSetCollection
1617
{

src/Contracts/NodeQueryBuilder.php

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
* @method NodeQueryBuilder<Tmodel> orderBy(string $column, string $direction = 'asc')
3030
* @method NodeQueryBuilder<Tmodel> when(bool $value, \Closure $callback)
3131
* @method BaseQueryBuilder toBase()
32+
* @method NodeQueryBuilder<Tmodel> whereIn(string $column, array<int,string> $values, string $boolean = 'and', string $not = false)
33+
* @method NodeQueryBuilder<Tmodel> whereRaw(string $sql, string[] $bindings = [], string $boolean = 'and')
34+
* @method int delete(null|mixed $id = null)
3235
*/
3336
interface NodeQueryBuilder extends Builder
3437
{

src/QueryBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ public function whereIsLeaf(): NodeQueryBuilder
384384
{
385385
list($lft, $rgt) = $this->wrappedColumns();
386386

387-
return $this->whereRaw("$lft = $rgt - 1");
387+
return $this->whereRaw("$lft = $rgt - 1"); /** @phpstan-ignore staticMethod.dynamicCall */
388388
}
389389

390390
/**

0 commit comments

Comments
 (0)