for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of Railt package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Railt\SDL\Backend\Linker;
use GraphQL\Contracts\TypeSystem\SchemaInterface;
* Class Registry
final class Registry implements LinkerInterface
{
* @var array|callable[]
private array $loaders = [];
* @param string $type
* @param SchemaInterface $context
* @return void
* @throws \LogicException
public function fetch(string $type, SchemaInterface $context)
$type
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function fetch(/** @scrutinizer ignore-unused */ string $type, SchemaInterface $context)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$context
public function fetch(string $type, /** @scrutinizer ignore-unused */ SchemaInterface $context)
throw new \LogicException('Not implemented yet');
}
* {@inheritDoc}
public function getAutoloaders(): iterable
return $this->loaders;
* @param callable $loader
* @return $this
public function autoload(callable $loader): self
$this->loaders[] = $loader;
return $this;
public function cancelAutoload(callable $loader): self
$this->loaders = \array_filter($this->loaders, static function (callable $haystack) use ($loader): bool {
return $haystack !== $loader;
});
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.