1 | <?php namespace Anomaly\Streams\Platform\Ui\ControlPanel\Component\Section; |
||
13 | class Section implements SectionInterface |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * The section slug. |
||
18 | * |
||
19 | * @var null|string |
||
20 | */ |
||
21 | protected $slug = null; |
||
22 | |||
23 | /** |
||
24 | * The section icon. |
||
25 | * |
||
26 | * @var null|string |
||
27 | */ |
||
28 | protected $icon = null; |
||
29 | |||
30 | /** |
||
31 | * The section title. |
||
32 | * |
||
33 | * @var null|string |
||
34 | */ |
||
35 | protected $title = null; |
||
36 | |||
37 | /** |
||
38 | * The class. |
||
39 | * |
||
40 | * @var null|string |
||
41 | */ |
||
42 | protected $class = null; |
||
43 | |||
44 | /** |
||
45 | * The active flag. |
||
46 | * |
||
47 | * @var bool |
||
48 | */ |
||
49 | protected $active = false; |
||
50 | |||
51 | /** |
||
52 | * The path matcher. |
||
53 | * |
||
54 | * @var null|string |
||
55 | */ |
||
56 | protected $matcher = null; |
||
57 | |||
58 | /** |
||
59 | * The section description. |
||
60 | * |
||
61 | * @var null|string |
||
62 | */ |
||
63 | protected $description = null; |
||
64 | |||
65 | /** |
||
66 | * The highlighted flag. |
||
67 | * |
||
68 | * @var bool |
||
69 | */ |
||
70 | protected $highlighted = false; |
||
71 | |||
72 | /** |
||
73 | * The section parent. |
||
74 | * |
||
75 | * @var null|string |
||
76 | */ |
||
77 | protected $parent = null; |
||
78 | |||
79 | /** |
||
80 | * Section buttons. These are only to |
||
81 | * transport input to the button builder. |
||
82 | * |
||
83 | * @var array |
||
84 | */ |
||
85 | protected $buttons = []; |
||
86 | |||
87 | /** |
||
88 | * The section attributes. |
||
89 | * |
||
90 | * @var array |
||
91 | */ |
||
92 | protected $attributes = []; |
||
93 | |||
94 | /** |
||
95 | * The section permission. |
||
96 | * |
||
97 | * @var null|string |
||
98 | */ |
||
99 | protected $permission = null; |
||
100 | |||
101 | /** |
||
102 | * The section breadcrumb. |
||
103 | * |
||
104 | * @var null|string |
||
105 | */ |
||
106 | protected $breadcrumb = null; |
||
107 | |||
108 | /** |
||
109 | * Get the slug. |
||
110 | * |
||
111 | * @return null|string |
||
112 | */ |
||
113 | public function getSlug() |
||
117 | |||
118 | /** |
||
119 | * Set the slug. |
||
120 | * |
||
121 | * @param $slug |
||
122 | * @return $this |
||
123 | */ |
||
124 | public function setSlug($slug) |
||
130 | |||
131 | /** |
||
132 | * Get the icon. |
||
133 | * |
||
134 | * @return null|string |
||
135 | */ |
||
136 | public function getIcon() |
||
140 | |||
141 | /** |
||
142 | * Set the icon. |
||
143 | * |
||
144 | * @param $icon |
||
145 | * @return $this |
||
146 | */ |
||
147 | public function setIcon($icon) |
||
153 | |||
154 | /** |
||
155 | * Get the title. |
||
156 | * |
||
157 | * @return string |
||
158 | */ |
||
159 | public function getTitle() |
||
163 | |||
164 | /** |
||
165 | * Set the title. |
||
166 | * |
||
167 | * @param string $title |
||
168 | */ |
||
169 | public function setTitle($title) |
||
173 | |||
174 | /** |
||
175 | * Get the class. |
||
176 | * |
||
177 | * @return string |
||
178 | */ |
||
179 | public function getClass() |
||
183 | |||
184 | /** |
||
185 | * Set the class. |
||
186 | * |
||
187 | * @param $class |
||
188 | * @return $this |
||
189 | */ |
||
190 | public function setClass($class) |
||
196 | |||
197 | /** |
||
198 | * Get the active flag. |
||
199 | * |
||
200 | * @return boolean |
||
201 | */ |
||
202 | public function isActive() |
||
206 | |||
207 | /** |
||
208 | * Set the active flag. |
||
209 | * |
||
210 | * @param boolean $active |
||
211 | */ |
||
212 | public function setActive($active) |
||
218 | |||
219 | /** |
||
220 | * Get the matcher. |
||
221 | * |
||
222 | * @return null|string |
||
223 | */ |
||
224 | public function getMatcher() |
||
228 | |||
229 | /** |
||
230 | * Set the matcher. |
||
231 | * |
||
232 | * @param $matcher |
||
233 | * @return $this |
||
234 | */ |
||
235 | public function setMatcher($matcher) |
||
241 | |||
242 | /** |
||
243 | * Get the description. |
||
244 | * |
||
245 | * @return null|string |
||
246 | */ |
||
247 | public function getDescription() |
||
251 | |||
252 | /** |
||
253 | * Set the description. |
||
254 | * |
||
255 | * @param $description |
||
256 | * @return $this |
||
257 | */ |
||
258 | public function setDescription($description) |
||
264 | |||
265 | /** |
||
266 | * Get the highlighted flag. |
||
267 | * |
||
268 | * @return boolean |
||
269 | */ |
||
270 | public function isHighlighted() |
||
274 | |||
275 | /** |
||
276 | * Set the highlighted flag. |
||
277 | * |
||
278 | * @param boolean $active |
||
|
|||
279 | * @return $this |
||
280 | */ |
||
281 | public function setHighlighted($highlighted) |
||
287 | |||
288 | /** |
||
289 | * Get the parent. |
||
290 | * |
||
291 | * @return null|string |
||
292 | */ |
||
293 | public function getParent() |
||
297 | |||
298 | /** |
||
299 | * Return if the section is |
||
300 | * a sub-section or not. |
||
301 | * |
||
302 | * @return bool |
||
303 | */ |
||
304 | public function isSubSection() |
||
308 | |||
309 | /** |
||
310 | * Set the parent. |
||
311 | * |
||
312 | * @param $parent |
||
313 | * @return $this |
||
314 | */ |
||
315 | public function setParent($parent) |
||
321 | |||
322 | /** |
||
323 | * Get the buttons. |
||
324 | * |
||
325 | * @return array |
||
326 | */ |
||
327 | public function getButtons() |
||
331 | |||
332 | /** |
||
333 | * Set the buttons. |
||
334 | * |
||
335 | * @param array $buttons |
||
336 | */ |
||
337 | public function setButtons($buttons) |
||
341 | |||
342 | /** |
||
343 | * Get the attributes. |
||
344 | * |
||
345 | * @return array |
||
346 | */ |
||
347 | public function getAttributes() |
||
351 | |||
352 | /** |
||
353 | * Set the attributes. |
||
354 | * |
||
355 | * @param array $attributes |
||
356 | */ |
||
357 | public function setAttributes(array $attributes) |
||
361 | |||
362 | /** |
||
363 | * Get the permission. |
||
364 | * |
||
365 | * @return null|string |
||
366 | */ |
||
367 | public function getPermission() |
||
371 | |||
372 | /** |
||
373 | * Set the permission. |
||
374 | * |
||
375 | * @param $permission |
||
376 | * @return $this |
||
377 | */ |
||
378 | public function setPermission($permission) |
||
384 | |||
385 | /** |
||
386 | * Get the breadcrumb. |
||
387 | * |
||
388 | * @return null|string |
||
389 | */ |
||
390 | public function getBreadcrumb() |
||
394 | |||
395 | /** |
||
396 | * Set the breadcrumb. |
||
397 | * |
||
398 | * @param $breadcrumb |
||
399 | * @return $this |
||
400 | */ |
||
401 | public function setBreadcrumb($breadcrumb) |
||
407 | |||
408 | /** |
||
409 | * Get the HREF attribute. |
||
410 | * |
||
411 | * @param null $path |
||
412 | * @return string |
||
413 | */ |
||
414 | public function getHref($path = null) |
||
422 | |||
423 | /** |
||
424 | * Return the child sections. |
||
425 | * |
||
426 | * @return SectionCollection |
||
427 | */ |
||
428 | public function getChildren() |
||
432 | |||
433 | /** |
||
434 | * Return whether the section |
||
435 | * has children or not. |
||
436 | * |
||
437 | * @return bool |
||
438 | */ |
||
439 | public function hasChildren() |
||
443 | } |
||
444 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.