Skip to content

Commit 9548b1b

Browse files
authored
Clean up docblocks (#2390)
1 parent 15345a7 commit 9548b1b

27 files changed

+40
-47
lines changed

src/Console/PrintSchemaCommand.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
use GraphQL\Type\Introspection;
66
use GraphQL\Utils\SchemaPrinter;
77
use Illuminate\Console\Command;
8-
use Illuminate\Contracts\Filesystem\Filesystem;
98
use Illuminate\Filesystem\FilesystemManager;
10-
use Illuminate\Support\Facades\Storage;
119
use Nuwave\Lighthouse\Federation\FederationPrinter;
1210
use Nuwave\Lighthouse\Schema\AST\ASTCache;
1311
use Nuwave\Lighthouse\Schema\SchemaBuilder;
@@ -56,9 +54,10 @@ public function handle(ASTCache $cache, FilesystemManager $filesystemManager, Sc
5654

5755
if ($this->option('write')) {
5856
$disk = $this->option('disk');
59-
if (! is_string($disk) && ! is_null($disk)) {
57+
if (! is_string($disk) && ! is_null($disk)) { // @phpstan-ignore-line can be array
6058
$diskType = gettype($disk);
6159
$this->error("Expected option disk to be string or null, got: {$diskType}.");
60+
6261
return;
6362
}
6463

src/Deprecation/DetectDeprecatedUsage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ class DetectDeprecatedUsage extends ValidationRule
2525
/** @var DeprecationHandler */
2626
protected $deprecationHandler;
2727

28-
/** @param DeprecationHandler $deprecationHandler */
28+
/** @param DeprecationHandler $deprecationHandler */
2929
public function __construct(callable $deprecationHandler)
3030
{
3131
$this->deprecationHandler = $deprecationHandler;
3232
}
3333

34-
/** @param DeprecationHandler $deprecationHandler */
34+
/** @param DeprecationHandler $deprecationHandler */
3535
public static function handle(callable $deprecationHandler): void
3636
{
3737
DocumentValidator::addRule(new static($deprecationHandler));

src/Exceptions/DefinitionException.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Nuwave\Lighthouse\Exceptions;
44

5-
use Exception;
65
use GraphQL\Error\ClientAware;
76

87
/**

src/Execution/Arguments/ArgPartitioner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public static function relationMethods(
8585
/**
8686
* Attach a nested argument resolver to an argument.
8787
*
88-
* @param \ReflectionClass<\Illuminate\Database\Eloquent\Model>|null $model
88+
* @param \ReflectionClass<\Illuminate\Database\Eloquent\Model>|null $model
8989
*/
9090
protected static function attachNestedArgResolver(string $name, Argument &$argument, ?\ReflectionClass $model): void
9191
{

src/Federation/BatchedEntityResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface BatchedEntityResolver
77
/**
88
* Resolve multiple entities of a single type in one batch.
99
*
10-
* @param array<string, array<string, mixed>> $representations
10+
* @param array<string, array<string, mixed>> $representations
1111
*
1212
* @return iterable<string, mixed> must preserve the count and keys of $representations
1313
*/

src/Federation/EntityResolverProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public function firstSatisfiedKeyFields(Collection $keyFieldsSelections, array $
261261
?? throw new Error('Representation does not satisfy any set of uniquely identifying keys: ' . \Safe\json_encode($representation));
262262
}
263263

264-
/** @param array<string, mixed> $representation */
264+
/** @param array<string, mixed> $representation */
265265
protected function hydrateExternalFields(Model $model, array $representation, ObjectTypeDefinitionNode $definition): void
266266
{
267267
foreach ($definition->fields as $field) {

src/GraphQL.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function __construct(
6464
*
6565
* @api
6666
*
67-
* @param array<string, mixed>|null $variables
67+
* @param array<string, mixed>|null $variables
6868
*
6969
* @return array<string, mixed>
7070
*/
@@ -95,7 +95,7 @@ public function executeQueryString(
9595
* you will probably want to call `->toArray($debug)` on it,
9696
* with $debug being a combination of flags in @see \GraphQL\Error\DebugFlag
9797
*
98-
* @param array<string, mixed>|null $variables
98+
* @param array<string, mixed>|null $variables
9999
*
100100
* @return array<string, mixed>
101101
*/

src/Pagination/PaginationArgs.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ protected static function calculateCurrentPage(int $first, int $after, int $defa
7878
*
7979
* @param \Illuminate\Database\Query\Builder|\Laravel\Scout\Builder|\Illuminate\Database\Eloquent\Builder<TModel>|\Illuminate\Database\Eloquent\Relations\Relation<TModel> $builder
8080
*
81-
* @return Paginator<TModel>
81+
* @return \Illuminate\Contracts\Pagination\Paginator<TModel>
8282
*/
8383
public function applyToBuilder(QueryBuilder|ScoutBuilder|EloquentBuilder|Relation $builder): Paginator
8484
{

src/Pagination/PaginatorField.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ class PaginatorField
1313
* @return array{
1414
* count: int,
1515
* currentPage: int,
16-
* firstItem: int,
16+
* firstItem: int|null,
1717
* hasMorePages: bool,
18-
* lastItem: int,
18+
* lastItem: int|null,
1919
* lastPage: int,
2020
* perPage: int,
2121
* total: int,

src/Pagination/SimplePaginatorField.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class SimplePaginatorField
1515
* @return array{
1616
* count: int,
1717
* currentPage: int,
18-
* firstItem: int,
19-
* lastItem: int,
18+
* firstItem: int|null,
19+
* lastItem: int|null,
2020
* perPage: int,
2121
* hasMorePages: bool,
2222
* }

0 commit comments

Comments
 (0)