1 | <?php |
||
19 | class DebuggerOptions extends AbstractOptions |
||
20 | { |
||
21 | /** |
||
22 | * @var bool |
||
23 | */ |
||
24 | protected $enabled = true; |
||
25 | |||
26 | /** |
||
27 | * @var bool|null |
||
28 | */ |
||
29 | protected $mode = null; |
||
30 | |||
31 | /** |
||
32 | * @var bool |
||
33 | */ |
||
34 | protected $bar = false; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | protected $barInfo = []; |
||
40 | |||
41 | /** |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $barPanels = [ |
||
45 | 'WebinoDebug:timer' => Bar\TimerPanel::class, |
||
46 | 'WebinoDebug:info' => Bar\InfoPanel::class, |
||
47 | 'WebinoDebug:config' => Bar\ConfigPanel::class, |
||
48 | 'WebinoDebug:events' => Bar\EventPanel::class, |
||
49 | ]; |
||
50 | |||
51 | /** |
||
52 | * @var array |
||
53 | */ |
||
54 | protected $cssFiles = [__DIR__ . '/../../../data/assets/Bar/style.css']; |
||
55 | |||
56 | /** |
||
57 | * @var array |
||
58 | */ |
||
59 | protected $jsFiles = [__DIR__ . '/../../../data/assets/Bar/script.js']; |
||
60 | |||
61 | /** |
||
62 | * @var bool |
||
63 | */ |
||
64 | protected $strict = false; |
||
65 | |||
66 | /** |
||
67 | * @var string|null |
||
68 | */ |
||
69 | protected $log; |
||
70 | |||
71 | /** |
||
72 | * @var string |
||
73 | */ |
||
74 | protected $email = ''; |
||
75 | |||
76 | /** |
||
77 | * @var int |
||
78 | */ |
||
79 | protected $maxDepth = 10; |
||
80 | |||
81 | /** |
||
82 | * @var int |
||
83 | */ |
||
84 | protected $maxLength = 300; |
||
85 | |||
86 | /** |
||
87 | * @var bool |
||
88 | */ |
||
89 | protected $barNoLogo = false; |
||
90 | |||
91 | /** |
||
92 | * @var bool |
||
93 | */ |
||
94 | protected $barNoClose = false; |
||
95 | |||
96 | /** |
||
97 | * Is debugger enabled? |
||
98 | * |
||
99 | * @return bool |
||
100 | */ |
||
101 | public function isEnabled() |
||
105 | |||
106 | /** |
||
107 | * Enable debugger |
||
108 | * |
||
109 | * @param bool $enabled |
||
110 | * @return $this |
||
111 | */ |
||
112 | public function setEnabled($enabled) |
||
117 | |||
118 | /** |
||
119 | * Is debugger disabled? |
||
120 | * |
||
121 | * @return bool |
||
122 | */ |
||
123 | public function isDisabled() |
||
127 | |||
128 | /** |
||
129 | * Debugger mode |
||
130 | * |
||
131 | * true = production|false |
||
132 | * false = development|null |
||
133 | * null = autodetect|IP address(es) csv/array |
||
134 | * |
||
135 | * @return bool|null |
||
136 | */ |
||
137 | public function getMode() |
||
141 | |||
142 | /** |
||
143 | * Debugger mode, production or development. |
||
144 | * |
||
145 | * @param bool|null $mode |
||
146 | * @return $this |
||
147 | */ |
||
148 | public function setMode($mode) |
||
153 | |||
154 | /** |
||
155 | * Is debugger bar enabled? |
||
156 | * |
||
157 | * @return bool |
||
158 | */ |
||
159 | public function showBar() |
||
163 | |||
164 | /** |
||
165 | * Toggle debugger bar |
||
166 | * |
||
167 | * @param bool $bar |
||
168 | * @return $this |
||
169 | */ |
||
170 | public function setBar($bar) |
||
175 | |||
176 | /** |
||
177 | * Debugger bar panels |
||
178 | * |
||
179 | * @return array |
||
180 | */ |
||
181 | public function getBarPanels() |
||
185 | |||
186 | /** |
||
187 | * Set custom debugger bar panels |
||
188 | * |
||
189 | * @param array $barPanels |
||
190 | * @return $this |
||
191 | */ |
||
192 | public function setBarPanels(array $barPanels) |
||
197 | |||
198 | /** |
||
199 | * @return array |
||
200 | */ |
||
201 | public function getCssFiles() |
||
205 | |||
206 | /** |
||
207 | * Set custom CSS files |
||
208 | * |
||
209 | * @param array $cssFiles |
||
210 | * @return $this |
||
211 | */ |
||
212 | public function setCssFiles($cssFiles) |
||
217 | |||
218 | /** |
||
219 | * @return array |
||
220 | */ |
||
221 | public function getJsFiles() |
||
225 | |||
226 | /** |
||
227 | * Set custom Javascript files |
||
228 | * |
||
229 | * @param array $jsFiles |
||
230 | * @return $this |
||
231 | */ |
||
232 | public function setJsFiles($jsFiles) |
||
237 | |||
238 | /** |
||
239 | * Return custom debugger bar info |
||
240 | * |
||
241 | * @return array |
||
242 | */ |
||
243 | public function getBarInfo() |
||
247 | |||
248 | /** |
||
249 | * Set custom debugger bar info |
||
250 | * |
||
251 | * @param array $barInfo |
||
252 | * @return $this |
||
253 | */ |
||
254 | public function setBarInfo(array $barInfo) |
||
259 | |||
260 | /** |
||
261 | * @return bool |
||
262 | */ |
||
263 | public function isStrict() |
||
267 | |||
268 | /** |
||
269 | * Strict errors? |
||
270 | * |
||
271 | * @param bool $strict |
||
272 | * @return $this |
||
273 | */ |
||
274 | public function setStrict($strict) |
||
279 | |||
280 | /** |
||
281 | * @return string Empty string to disable, null for default |
||
282 | */ |
||
283 | public function getLog() |
||
290 | |||
291 | /** |
||
292 | * Path to log directory |
||
293 | * |
||
294 | * @param string $log |
||
295 | * @return $this |
||
296 | */ |
||
297 | public function setLog($log) |
||
302 | |||
303 | /** |
||
304 | * Administrator address |
||
305 | * |
||
306 | * @return string |
||
307 | */ |
||
308 | public function getEmail() |
||
312 | |||
313 | /** |
||
314 | * Configure debugger administrator email |
||
315 | * |
||
316 | * @param string $email |
||
317 | * @return $this |
||
318 | */ |
||
319 | public function setEmail($email) |
||
324 | |||
325 | /** |
||
326 | * @return int |
||
327 | */ |
||
328 | public function getMaxDepth() |
||
332 | |||
333 | /** |
||
334 | * Variable dump max depth |
||
335 | * |
||
336 | * @param int $maxDepth |
||
337 | * @return $this |
||
338 | */ |
||
339 | public function setMaxDepth($maxDepth) |
||
344 | |||
345 | /** |
||
346 | * @return int |
||
347 | */ |
||
348 | public function getMaxLength() |
||
352 | |||
353 | /** |
||
354 | * Maximum length of a variable |
||
355 | * |
||
356 | * @param int $maxLength |
||
357 | * @return $this |
||
358 | */ |
||
359 | public function setMaxLength($maxLength) |
||
364 | |||
365 | /** |
||
366 | * Has debugger bar a disabled logo? |
||
367 | * |
||
368 | * @return bool |
||
369 | */ |
||
370 | public function hasBarNoLogo() |
||
374 | |||
375 | /** |
||
376 | * Set debugger bar logo disabled |
||
377 | * |
||
378 | * @param bool $noLogo |
||
|
|||
379 | * @return $this |
||
380 | */ |
||
381 | public function setBarNoLogo($barNoLogo = true) |
||
386 | |||
387 | /** |
||
388 | * Has debugger bar close button disabled? |
||
389 | * |
||
390 | * @return bool |
||
391 | */ |
||
392 | public function hasBarNoClose() |
||
396 | |||
397 | /** |
||
398 | * Disable debugger bar close button |
||
399 | * |
||
400 | * @param bool $barNoClose |
||
401 | * @return $this |
||
402 | */ |
||
403 | public function setBarNoClose($barNoClose = true) |
||
408 | } |
||
409 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.