| 1 | <?php |
||
| 8 | trait ComplexityAwarePluginTrait { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * {@inheritdoc} |
||
| 12 | */ |
||
| 13 | abstract public function getPluginDefinition(); |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Build the field's cost for static query complexity analysis. |
||
| 17 | * |
||
| 18 | * @return int|callable |
||
| 19 | * The cost of this field or a callable to calculate the cost at runtime. |
||
| 20 | */ |
||
| 21 | protected function buildCost() { |
||
| 37 | |||
| 38 | } |
||
| 39 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.jsonfile (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.jsonto 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
requireorrequire-devsection?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceofchecks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.