1 | <?php |
||
7 | class Config { |
||
8 | |||
9 | const T_PLUGINS_ALL = 0; |
||
10 | const T_PLUGINS_ACTIVE = 1; |
||
11 | const T_PLUGINS_INACTIVE = 2; |
||
12 | |||
13 | /** |
||
14 | * @var array |
||
15 | */ |
||
16 | protected $options = array(); |
||
17 | |||
18 | /** |
||
19 | * Selected subdirectory of rootpath to find problems in |
||
20 | * |
||
21 | * @var string|null |
||
22 | */ |
||
23 | protected $subPath = null; |
||
24 | |||
25 | /** |
||
26 | * Maximum version to analyze |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $maxVersion = ''; |
||
31 | |||
32 | /** |
||
33 | * Should we include disabled plugins within mod/ directory for analysis |
||
34 | * |
||
35 | * @var bool |
||
36 | */ |
||
37 | protected $includeDisabledPlugins = false; |
||
38 | |||
39 | /** |
||
40 | * Should we perform deprecated functions usage search. |
||
41 | * |
||
42 | * @var bool |
||
43 | */ |
||
44 | protected $findDeprecatedFunctions = true; |
||
45 | |||
46 | /** |
||
47 | * Should we perform private functions usage search. |
||
48 | * |
||
49 | * @var bool |
||
50 | */ |
||
51 | protected $findPrivateFunctions = true; |
||
52 | |||
53 | /** |
||
54 | * Should we attempt to fix bad code? THIS IS DANGEROUS OPTION, CAREFUL! |
||
55 | * |
||
56 | * @var bool |
||
57 | */ |
||
58 | protected $fixProblems = false; |
||
59 | |||
60 | /** |
||
61 | * @param array $options |
||
62 | */ |
||
63 | 3 | public function __construct(array $options = array()) { |
|
66 | |||
67 | /** |
||
68 | * @param $key |
||
69 | * @return mixed |
||
70 | */ |
||
71 | public function __get($key) { |
||
74 | |||
75 | /** |
||
76 | * @param $key |
||
77 | * @param null $default |
||
78 | * @return null |
||
79 | */ |
||
80 | 2 | public function getOption($key, $default = null) { |
|
83 | |||
84 | /** |
||
85 | * @param $key |
||
86 | * @param $value |
||
87 | */ |
||
88 | public function __set($key, $value) { |
||
91 | |||
92 | /** |
||
93 | * @param $type |
||
94 | * @return array |
||
95 | */ |
||
96 | 1 | public function getPluginIds($type) { |
|
128 | |||
129 | /* |
||
130 | * Shorthand methods |
||
131 | */ |
||
132 | |||
133 | /** |
||
134 | * @param array $vars |
||
135 | */ |
||
136 | public function parseInput(array $vars) { |
||
152 | |||
153 | /** |
||
154 | * @return bool |
||
155 | */ |
||
156 | public function isFixProblemsEnabled() { |
||
159 | |||
160 | /** |
||
161 | * @return string |
||
162 | */ |
||
163 | public function getMaxVersion() { |
||
170 | |||
171 | /** |
||
172 | * @return string |
||
173 | */ |
||
174 | public function getSubPath() { |
||
177 | |||
178 | /** |
||
179 | * @return bool |
||
180 | */ |
||
181 | 2 | public function isIncludeDisabledPluginsEnabled() { |
|
184 | |||
185 | /** |
||
186 | * @return bool |
||
187 | */ |
||
188 | 2 | public function isSkipInactivePluginsEnabled() { |
|
191 | |||
192 | /** |
||
193 | * @return bool |
||
194 | */ |
||
195 | public function isDeprecatedFunctionsTestEnabled() { |
||
198 | |||
199 | /** |
||
200 | * @return bool |
||
201 | */ |
||
202 | public function isPrivateFunctionsTestEnabled() { |
||
205 | } |
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.