Skip to content

Commit 02ff391

Browse files
committed
phpstan: fix errors
1 parent cf55eab commit 02ff391

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

phpstan-baseline.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ parameters:
226226
path: src/Support/PaginationType.php
227227

228228
-
229-
message: "#^Parameter \\#1 \\$underlyingType of method Rebing\\\\GraphQL\\\\Support\\\\PaginationType\\:\\:getPaginationFields\\(\\) expects GraphQL\\\\Type\\\\Definition\\\\ObjectType, GraphQL\\\\Type\\\\Definition\\\\Type given\\.$#"
229+
message: "#^Parameter \\#1 \\$type of static method GraphQL\\\\Type\\\\Definition\\\\Type\\:\\:nonNull\\(\\) expects \\(callable\\(\\)\\: \\(GraphQL\\\\Type\\\\Definition\\\\NullableType&GraphQL\\\\Type\\\\Definition\\\\Type\\)\\)\\|\\(GraphQL\\\\Type\\\\Definition\\\\NullableType&GraphQL\\\\Type\\\\Definition\\\\Type\\), GraphQL\\\\Type\\\\Definition\\\\Type given\\.$#"
230230
count: 1
231231
path: src/Support/PaginationType.php
232232

@@ -366,7 +366,7 @@ parameters:
366366
path: src/Support/SelectFields.php
367367

368368
-
369-
message: "#^Parameter \\#1 \\$underlyingType of method Rebing\\\\GraphQL\\\\Support\\\\SimplePaginationType\\:\\:getPaginationFields\\(\\) expects GraphQL\\\\Type\\\\Definition\\\\ObjectType, GraphQL\\\\Type\\\\Definition\\\\Type given\\.$#"
369+
message: "#^Parameter \\#1 \\$type of static method GraphQL\\\\Type\\\\Definition\\\\Type\\:\\:nonNull\\(\\) expects \\(callable\\(\\)\\: \\(GraphQL\\\\Type\\\\Definition\\\\NullableType&GraphQL\\\\Type\\\\Definition\\\\Type\\)\\)\\|\\(GraphQL\\\\Type\\\\Definition\\\\NullableType&GraphQL\\\\Type\\\\Definition\\\\Type\\), GraphQL\\\\Type\\\\Definition\\\\Type given\\.$#"
370370
count: 1
371371
path: src/Support/SimplePaginationType.php
372372

tests/Database/SelectFields/PrimaryKeyTests/ModelInterfaceType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use GraphQL\Type\Definition\Type;
77
use Rebing\GraphQL\Support\Facades\GraphQL;
88
use Rebing\GraphQL\Support\InterfaceType;
9+
use Rebing\GraphQL\Tests\Support\Models\Post;
910

1011
class ModelInterfaceType extends InterfaceType
1112
{
@@ -22,7 +23,7 @@ public function fields(): array
2223
];
2324
}
2425

25-
public function resolveType($root)
26+
public function resolveType(Post $root): Type
2627
{
2728
return GraphQL::type('Post');
2829
}

0 commit comments

Comments
 (0)