1 | <?php |
||
9 | class ElementList extends Template |
||
10 | { |
||
11 | const TOP_STYLE_COMPACT = 'compact'; |
||
12 | const TOP_STYLE_LARGE = 'large'; |
||
13 | /** |
||
14 | * @var Element[] |
||
15 | */ |
||
16 | private $elements; |
||
17 | |||
18 | /** |
||
19 | * @var ButtonModel|null |
||
20 | */ |
||
21 | private $button; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $topElementStyle; |
||
27 | |||
28 | /** |
||
29 | * @param Element[] $elements |
||
30 | * @param ButtonModel|null $button |
||
31 | * @param string $topElementStyle |
||
32 | */ |
||
33 | 11 | public function __construct(array $elements, ButtonModel $button = null, $topElementStyle = self::TOP_STYLE_LARGE) |
|
53 | |||
54 | /** |
||
55 | * @return Element[] |
||
56 | */ |
||
57 | 1 | public function getElements() |
|
61 | |||
62 | /** |
||
63 | * @return string |
||
64 | */ |
||
65 | 2 | public function getTopElementStyle() |
|
69 | |||
70 | /*** |
||
|
|||
71 | * @return null|ButtonModel |
||
72 | */ |
||
73 | 1 | public function getButton() |
|
77 | |||
78 | /** |
||
79 | * @return string |
||
80 | */ |
||
81 | 2 | public function getType() |
|
85 | |||
86 | /** |
||
87 | * @inheritdoc |
||
88 | */ |
||
89 | 1 | public function jsonSerialize() |
|
98 | } |
||
99 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.