| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | 4 | public function getOrder() |
|
| 13 | { |
||
| 14 | 4 | $rows = $this->model->orderBy($this->model->orderFieldName(), 'asc')->get(); |
|
|
|
|||
| 15 | |||
| 16 | 4 | $this->layoutManager->add([ |
|
| 17 | 4 | 'content' => view('expendable::admin.form.state.order', [ |
|
| 18 | 4 | 'rows' => $rows, |
|
| 19 | ]), |
||
| 20 | ]); |
||
| 21 | |||
| 22 | 4 | return $this->layoutManager->render(); |
|
| 23 | } |
||
| 24 | |||
| 45 |
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: