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 string |
||
38 | */ |
||
39 | protected $barTitle; |
||
40 | |||
41 | /** |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $barInfo = []; |
||
45 | |||
46 | /** |
||
47 | * @var array |
||
48 | */ |
||
49 | protected $barPanels = [ |
||
50 | 'WebinoDebug:timer' => Bar\TimerPanel::class, |
||
51 | 'WebinoDebug:info' => Bar\InfoPanel::class, |
||
52 | 'WebinoDebug:config' => Bar\ConfigPanel::class, |
||
53 | 'WebinoDebug:events' => Bar\EventPanel::class, |
||
54 | ]; |
||
55 | |||
56 | /** |
||
57 | * @var array |
||
58 | */ |
||
59 | protected $cssFiles = [__DIR__ . '/../../../data/assets/Bar/style.css']; |
||
60 | |||
61 | /** |
||
62 | * @var array |
||
63 | */ |
||
64 | protected $jsFiles = [__DIR__ . '/../../../data/assets/Bar/script.js']; |
||
65 | |||
66 | /** |
||
67 | * @var bool |
||
68 | */ |
||
69 | protected $strict = false; |
||
70 | |||
71 | /** |
||
72 | * @var string|null |
||
73 | */ |
||
74 | protected $log; |
||
75 | |||
76 | /** |
||
77 | * @var string |
||
78 | */ |
||
79 | protected $email = ''; |
||
80 | |||
81 | /** |
||
82 | * @var int |
||
83 | */ |
||
84 | protected $maxDepth = 10; |
||
85 | |||
86 | /** |
||
87 | * @var int |
||
88 | */ |
||
89 | protected $maxLength = 300; |
||
90 | |||
91 | /** |
||
92 | * @var bool |
||
93 | */ |
||
94 | protected $barNoLogo = false; |
||
95 | |||
96 | /** |
||
97 | * @var bool |
||
98 | */ |
||
99 | protected $barNoClose = false; |
||
100 | |||
101 | /** |
||
102 | * Is debugger enabled? |
||
103 | * |
||
104 | * @return bool |
||
105 | */ |
||
106 | public function isEnabled() : bool |
||
110 | |||
111 | /** |
||
112 | * Enable debugger |
||
113 | * |
||
114 | * @param bool $enabled |
||
115 | * @return $this |
||
116 | */ |
||
117 | public function setEnabled($enabled = true) |
||
122 | |||
123 | /** |
||
124 | * Is debugger disabled? |
||
125 | * |
||
126 | * @return bool |
||
127 | */ |
||
128 | public function isDisabled() : bool |
||
132 | |||
133 | /** |
||
134 | * Debugger mode |
||
135 | * |
||
136 | * true = production|false |
||
137 | * false = development|null |
||
138 | * null = autodetect|IP address(es) csv/array |
||
139 | * |
||
140 | * @return bool|null |
||
141 | */ |
||
142 | public function getMode() : ?bool |
||
146 | |||
147 | /** |
||
148 | * Debugger mode, production or development. |
||
149 | * |
||
150 | * @param bool|null $mode |
||
151 | * @return $this |
||
152 | */ |
||
153 | public function setMode($mode) |
||
158 | |||
159 | /** |
||
160 | * Is debugger bar enabled? |
||
161 | * |
||
162 | * @return bool |
||
163 | */ |
||
164 | public function showBar() : bool |
||
168 | |||
169 | /** |
||
170 | * Toggle debugger bar |
||
171 | * |
||
172 | * @param bool $bar |
||
173 | * @return $this |
||
174 | */ |
||
175 | public function setBar($bar) |
||
180 | |||
181 | /** |
||
182 | * Debugger bar panels |
||
183 | * |
||
184 | * @return array |
||
185 | */ |
||
186 | public function getBarPanels() : array |
||
190 | |||
191 | /** |
||
192 | * Set custom debugger bar panels |
||
193 | * |
||
194 | * @param array $barPanels |
||
195 | * @return $this |
||
196 | */ |
||
197 | public function setBarPanels(array $barPanels) |
||
202 | |||
203 | /** |
||
204 | * @return array |
||
205 | */ |
||
206 | public function getCssFiles() : array |
||
210 | |||
211 | /** |
||
212 | * Set custom CSS files |
||
213 | * |
||
214 | * @param array $cssFiles |
||
215 | * @return $this |
||
216 | */ |
||
217 | public function setCssFiles(array $cssFiles) |
||
222 | |||
223 | /** |
||
224 | * @return array |
||
225 | */ |
||
226 | public function getJsFiles() : array |
||
230 | |||
231 | /** |
||
232 | * Set custom Javascript files |
||
233 | * |
||
234 | * @param array $jsFiles |
||
235 | * @return $this |
||
236 | */ |
||
237 | public function setJsFiles(array $jsFiles) |
||
242 | |||
243 | /** |
||
244 | * Return custom debugger bar info |
||
245 | * |
||
246 | * @return array |
||
247 | */ |
||
248 | public function getBarInfo() : array |
||
252 | |||
253 | /** |
||
254 | * Set custom debugger bar info |
||
255 | * |
||
256 | * @param array $barInfo |
||
257 | * @return $this |
||
258 | */ |
||
259 | public function setBarInfo(array $barInfo) |
||
264 | |||
265 | /** |
||
266 | * @return bool |
||
267 | */ |
||
268 | public function isStrict() : bool |
||
272 | |||
273 | /** |
||
274 | * Strict errors? |
||
275 | * |
||
276 | * @param bool $strict |
||
277 | * @return $this |
||
278 | */ |
||
279 | public function setStrict($strict) |
||
284 | |||
285 | /** |
||
286 | * @return string Empty string to disable, null for default |
||
287 | */ |
||
288 | public function getLog() : string |
||
295 | |||
296 | /** |
||
297 | * Path to log directory |
||
298 | * |
||
299 | * @param string $log |
||
300 | * @return $this |
||
301 | */ |
||
302 | public function setLog($log) |
||
307 | |||
308 | /** |
||
309 | * Administrator address |
||
310 | * |
||
311 | * @return string |
||
312 | */ |
||
313 | public function getEmail() : string |
||
317 | |||
318 | /** |
||
319 | * Configure debugger administrator email |
||
320 | * |
||
321 | * @param string $email |
||
322 | * @return $this |
||
323 | */ |
||
324 | public function setEmail($email) |
||
329 | |||
330 | /** |
||
331 | * @return int |
||
332 | */ |
||
333 | public function getMaxDepth() : int |
||
337 | |||
338 | /** |
||
339 | * Variable dump max depth |
||
340 | * |
||
341 | * @param int $maxDepth |
||
342 | * @return $this |
||
343 | */ |
||
344 | public function setMaxDepth($maxDepth) |
||
349 | |||
350 | /** |
||
351 | * @return int |
||
352 | */ |
||
353 | public function getMaxLength() : int |
||
357 | |||
358 | /** |
||
359 | * Maximum length of a variable |
||
360 | * |
||
361 | * @param int $maxLength |
||
362 | * @return $this |
||
363 | */ |
||
364 | public function setMaxLength($maxLength) |
||
369 | |||
370 | /** |
||
371 | * Return debugger bar title |
||
372 | * |
||
373 | * @return string |
||
374 | */ |
||
375 | public function getBarTitle() : string |
||
379 | |||
380 | /** |
||
381 | * Set debugger bar custom title |
||
382 | * |
||
383 | * @param string $barTitle |
||
384 | * @return $this |
||
385 | */ |
||
386 | public function setBarTitle(string $barTitle) |
||
391 | |||
392 | /** |
||
393 | * Has debugger bar a disabled logo? |
||
394 | * |
||
395 | * @return bool |
||
396 | */ |
||
397 | public function hasBarNoLogo() : bool |
||
401 | |||
402 | /** |
||
403 | * Set debugger bar logo disabled |
||
404 | * |
||
405 | * @param bool $noLogo |
||
|
|||
406 | * @return $this |
||
407 | */ |
||
408 | public function setBarNoLogo($barNoLogo = true) |
||
413 | |||
414 | /** |
||
415 | * Has debugger bar close button disabled? |
||
416 | * |
||
417 | * @return bool |
||
418 | */ |
||
419 | public function hasBarNoClose() : bool |
||
423 | |||
424 | /** |
||
425 | * Disable debugger bar close button |
||
426 | * |
||
427 | * @param bool $barNoClose |
||
428 | * @return $this |
||
429 | */ |
||
430 | public function setBarNoClose($barNoClose = true) |
||
435 | } |
||
436 |
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.