1 | <?php |
||
10 | class QueryProcessor { |
||
11 | |||
12 | /** |
||
13 | * The current user account. |
||
14 | * |
||
15 | * @var \Drupal\Core\Session\AccountProxyInterface |
||
16 | */ |
||
17 | protected $currentUser; |
||
18 | |||
19 | /** |
||
20 | * The schema loader service. |
||
21 | * |
||
22 | * @var \Drupal\graphql\GraphQL\Schema\SchemaLoader |
||
23 | */ |
||
24 | protected $schemaLoader; |
||
25 | |||
26 | /** |
||
27 | * The graphql container parameters. |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | protected $parameters; |
||
32 | |||
33 | /** |
||
34 | * QueryProcessor constructor. |
||
35 | * |
||
36 | * @param \Drupal\graphql\GraphQL\Schema\SchemaLoader $schemaLoader |
||
37 | * The schema loader service. |
||
38 | * @param \Drupal\Core\Session\AccountProxyInterface $currentUser |
||
39 | * The current user. |
||
40 | * @param array $parameters |
||
41 | * The graphql container parameters. |
||
42 | */ |
||
43 | public function __construct( |
||
52 | |||
53 | /** |
||
54 | * Execute a GraphQL query. |
||
55 | * |
||
56 | * @param string $schemaId |
||
57 | * The name of the schema to process the query against. |
||
58 | * @param string $query |
||
59 | * The GraphQL query. |
||
60 | * @param array $variables |
||
61 | * The query variables. |
||
62 | * @param bool $bypassSecurity |
||
63 | * Bypass field security |
||
64 | * |
||
65 | * @return \Drupal\graphql\GraphQL\Execution\QueryResult. |
||
66 | * The GraphQL query result. |
||
67 | */ |
||
68 | public function processQuery($schemaId, $query, array $variables = [], $bypassSecurity = FALSE) { |
||
108 | |||
109 | } |
||
110 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.