for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Application\Api\Field\Query;
use Application\Model\User;
use Ecodev\Felix\Api\Field\FieldInterface;
abstract class Viewer implements FieldInterface
{
public static function build(): iterable
yield 'viewer' => fn () => [
'type' => _types()->getOutput(User::class),
'description' => 'Represents currently logged-in user',
'resolve' => fn ($root, array $args): ?User => User::getCurrent(),
$root
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
'resolve' => fn (/** @scrutinizer ignore-unused */ $root, array $args): ?User => User::getCurrent(),
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$args
'resolve' => fn ($root, /** @scrutinizer ignore-unused */ array $args): ?User => User::getCurrent(),
];
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.