for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
declare(strict_types=1);
namespace Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction\GraphQL\Relay;
use Overblog\GraphQLBundle\Definition\GlobalVariables;
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction;
use Overblog\GraphQLBundle\Generator\TypeGenerator;
final class IdFetcherCallback extends ExpressionFunction
{
public function __construct(GlobalVariables $globalVariables, $name = 'idFetcherCallback')
parent::__construct(
$name,
function ($idFetcher) {
$code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $context, $info) { ';
$code .= 'return '.$idFetcher.'; }';
return $code;
},
// TODO: finish this callback
function ($arguments, $idFetcher) use ($globalVariables): callable {
[
'context' => $context,
'args' => $args,
'info' => $info
] = $arguments;
return function ($value) use ($idFetcher, $globalVariables, $args, $context, $info) {
$args
This check looks for imports that have been defined, but are not used in the scope.
$context
$globalVariables
$value
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
return function (/** @scrutinizer ignore-unused */ $value) use ($idFetcher, $globalVariables, $args, $context, $info) {
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$info
return $idFetcher;
};
}
);
This check looks for imports that have been defined, but are not used in the scope.