Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
38 | public function __construct($label, $link, array $options = [ ]) |
||
39 | { |
||
40 | $this->label = $label; |
||
41 | $this->link = $link; |
||
42 | $this->options = array_merge([ |
||
1 ignored issue
–
show
|
|||
43 | 'active' => false, |
||
44 | 'class' => null, |
||
45 | 'weight' => 0, |
||
46 | ], $options); |
||
47 | } |
||
48 | |||
97 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: