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\Api\Field\FieldInterface;
use Application\Model\User;
abstract class Viewer implements FieldInterface
{
public static function build(): array
return
[
'name' => 'viewer',
'type' => _types()->getOutput(User::class),
'description' => 'Represents currently logged-in user',
'resolve' => function ($root, array $args): ?User {
$args
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
'resolve' => function ($root, /** @scrutinizer ignore-unused */ array $args): ?User {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$root
'resolve' => function (/** @scrutinizer ignore-unused */ $root, array $args): ?User {
return 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.