1 | <?php |
||
26 | class ObjectPayloadsController extends AbstractController |
||
27 | { |
||
28 | /** |
||
29 | * The template base path |
||
30 | */ |
||
31 | const TEMPLATE_BASE = parent::TEMPLATE_BASE . '/objects'; |
||
32 | |||
33 | /** |
||
34 | * The index view template path |
||
35 | */ |
||
36 | const TEMPLATE_INDEX = self::TEMPLATE_BASE . '/payload'; |
||
37 | |||
38 | /** |
||
39 | * @param int $field |
||
40 | * @param int $element |
||
41 | * @return Response |
||
42 | * @throws HttpException |
||
43 | */ |
||
44 | public function actionIndex(int $field, int $element): Response |
||
81 | |||
82 | /** |
||
83 | * @return array |
||
84 | */ |
||
85 | private function getPayloadTypes(): array |
||
92 | |||
93 | /** |
||
94 | * @param Objects $field |
||
95 | * @param ElementInterface $element |
||
96 | * @param string $action |
||
97 | * @return array |
||
98 | */ |
||
99 | protected function getPayload( |
||
126 | |||
127 | |||
128 | /** |
||
129 | * @return array |
||
130 | */ |
||
131 | private function getTabs(): array |
||
144 | |||
145 | /******************************************* |
||
146 | * BASE PATHS |
||
147 | *******************************************/ |
||
148 | |||
149 | /** |
||
150 | * @return string |
||
151 | */ |
||
152 | protected function getBaseCpPath(): string |
||
156 | |||
157 | /** |
||
158 | * @return string |
||
159 | */ |
||
160 | protected function getBaseActionPath(): string |
||
164 | |||
165 | |||
166 | /******************************************* |
||
167 | * VARIABLES |
||
168 | *******************************************/ |
||
169 | |||
170 | /** |
||
171 | * @inheritdoc |
||
172 | */ |
||
173 | protected function baseVariables(array &$variables = []) |
||
186 | } |
||
187 |
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.