| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function __construct( |
||
| 17 | string $name, |
||
| 18 | string $type, |
||
| 19 | array $groups, |
||
| 20 | array $options, |
||
| 21 | array $tags |
||
| 22 | ) { |
||
| 23 | $this->name = $name; |
||
| 24 | $this->type = $type; |
||
| 25 | $this->groups = $groups ?: [ Grid::DEFAULT_GROUP ]; |
||
| 26 | $this->options = $options; |
||
| 27 | $this->tags = $tags; |
||
|
|
|||
| 28 | } |
||
| 29 | |||
| 55 |
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: