Issues (53)

tests/GraphQLSchemaExtractor.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace AdvancedLearning\Oauth2Server\Tests;
4
5
use GraphQL\Type\Schema;
0 ignored issues
show
The type GraphQL\Type\Schema was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use SilverStripe\GraphQL\Middleware\QueryMiddleware;
0 ignored issues
show
The type SilverStripe\GraphQL\Middleware\QueryMiddleware was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
class GraphQLSchemaExtractor implements QueryMiddleware
9
{
10
    protected $callback;
11
12
    public function __construct($callback)
13
    {
14
        $this->callback = $callback;
15
    }
16
17
    public function process(Schema $schema, $query, $context, $params, callable $next)
18
    {
19
        if ($this->callback) {
20
            call_user_func($this->callback, $context);
21
        }
22
23
        return $next($schema, $query, $context, $params);
24
    }
25
}
26