| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function getCrudColumn(): array |
||
| 14 | { |
||
| 15 | $this->column['name'] = $this->name; |
||
|
|
|||
| 16 | $this->column['label'] = $this->name; |
||
| 17 | $this->column['type'] = $this->crudColumnType; |
||
| 18 | |||
| 19 | if ($this->crudColumnOptions) { |
||
| 20 | $this->addCrudColumnOptions(); |
||
| 21 | } |
||
| 22 | |||
| 23 | return $this->column; |
||
| 24 | } |
||
| 25 | |||
| 33 |
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: