Skip to content

Commit 5a2ae21

Browse files
committed
formatting
1 parent 86ab6cf commit 5a2ae21

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
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: 5
7+
level: 6
88
paths:
99
- src
1010
- tests/models/

src/Contracts/NodeQueryBuilder.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@
1212
*
1313
* @require-extends Illuminate\Database\Eloquent\Builder<NodeModel>
1414
*
15-
* @method NodeQueryBuilder select(array $columns)
15+
* @method NodeQueryBuilder<Tmodel> select(string[] $columns)
1616
* @method Tmodel getModel()
17-
* @method NodeQueryBuilder from(string $table)
18-
* @method NodeQueryBuilder getQuery()
19-
* @method NodeQueryBuilder whereRaw(string $sql, array $bindings = [], string $boolean = 'and')
17+
* @method NodeQueryBuilder<Tmodel> from(string $table)
18+
* @method NodeQueryBuilder<Tmodel> getQuery()
19+
* @method NodeQueryBuilder<Tmodel> whereRaw(string $sql, string[] $bindings = [], string $boolean = 'and')
2020
* @method \Illuminate\Database\Query\Grammars\Grammar getGrammar()
21-
* @method NodeQueryBuilder whereNested(\Closure|string $callback, string $boolean = 'and')
22-
* @method NestedSetCollection<Tmodel> get(array $columns = ['*'])
21+
* @method NodeQueryBuilder<Tmodel> whereNested(\Closure|string $callback, string $boolean = 'and')
22+
* @method NestedSetCollection<Tmodel> get(string[] $columns = ['*'])
2323
* @method int max(string $column)
24-
* @method NodeQueryBuilder where(string|array|\Closure $column, mixed $operator = null, mixed $value = null, string $boolean = 'and')
25-
* @method NodeModel|null first(array|string $columns = ['*'])
24+
* @method NodeQueryBuilder<Tmodel> where(string|string[]|\Closure $column, mixed $operator = null, mixed $value = null, string $boolean = 'and')
25+
* @method NodeModel|null first(string[]|string $columns = ['*'])
2626
* @method NodeModel findOrFail(int|string $id)
27-
* @method NodeQueryBuilder skip(int $value)
28-
* @method NodeQueryBuilder take(int $value)
29-
* @method NodeQueryBuilder orderBy(string $column, string $direction = 'asc')
30-
* @method NodeQueryBuilder when(bool $value, \Closure $callback)
27+
* @method NodeQueryBuilder<Tmodel> skip(int $value)
28+
* @method NodeQueryBuilder<Tmodel> take(int $value)
29+
* @method NodeQueryBuilder<Tmodel> orderBy(string $column, string $direction = 'asc')
30+
* @method NodeQueryBuilder<Tmodel> when(bool $value, \Closure $callback)
3131
* @method BaseQueryBuilder toBase()
3232
*/
3333
interface NodeQueryBuilder extends Builder

src/QueryBuilder.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* @phpstan-type NodeModel Node<Tmodel>&Tmodel
2121
*
2222
* @extends Builder<NodeModel>
23+
* @implements NodeQueryBuilder<Tmodel>
2324
*/
2425
class QueryBuilder extends Builder implements NodeQueryBuilder
2526
{
@@ -617,7 +618,7 @@ public function makeGap($cut, $height): int
617618
*
618619
* @param array{height:int,cut?:int,distance?:int,lft?:int,rgt?:int,to?:int,from?:int} $params
619620
*
620-
* @return array<string,Expression>
621+
* @return array<string,Expression<non-falsy-string>>
621622
*/
622623
protected function patch(array $params): array
623624
{
@@ -640,7 +641,7 @@ protected function patch(array $params): array
640641
* @param string $col
641642
* @param array{height:int,cut?:int,distance?:int,lft?:int,rgt?:int,to?:int,from?:int} $params
642643
*
643-
* @return Expression
644+
* @return Expression<non-falsy-string>
644645
*/
645646
protected function columnPatch(string $col, array $params): Expression
646647
{

0 commit comments

Comments
 (0)