1 | <?php |
||
8 | trait GraphQLTemplateTrait { |
||
9 | |||
10 | /** |
||
11 | * Recursively build the GraphQL query. |
||
12 | * |
||
13 | * Builds the templates GraphQL query by iterating through all included or |
||
14 | * embedded templates recursively. |
||
15 | */ |
||
16 | public function getGraphQLQuery() { |
||
42 | |||
43 | /** |
||
44 | * Get the files parent template. |
||
45 | * |
||
46 | * @return \Twig_Template|null |
||
47 | * The parent template or null. |
||
48 | */ |
||
49 | protected function getGraphQLParent() { |
||
52 | |||
53 | /** |
||
54 | * Retrieve the files graphql fragment. |
||
55 | * |
||
56 | * @return string |
||
57 | * The GraphQL fragment. |
||
58 | */ |
||
59 | public function getGraphQLFragment() { |
||
71 | |||
72 | /** |
||
73 | * Retrieve a list of all direct or indirect included templates. |
||
74 | * |
||
75 | * @return string[] |
||
76 | * The list of included templates. |
||
77 | */ |
||
78 | public function getGraphQLIncludes() { |
||
87 | } |
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.