Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 20 |
Ratio | 100 % |
Tests | 11 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php namespace Distilleries\Expendable\States; |
||
13 | 4 | View Code Duplication | public function getExport() |
14 | { |
||
15 | 4 | $form = FormBuilder::create($this->export_form, [ |
|
16 | 4 | 'model' => $this->model |
|
|
|||
17 | ]); |
||
18 | |||
19 | 4 | $form_content = view('expendable::admin.form.components.formgenerator.export', [ |
|
20 | 4 | 'form' => $form |
|
21 | ]); |
||
22 | 4 | $content = view('expendable::admin.form.state.form', [ |
|
23 | |||
24 | 4 | ]); |
|
25 | |||
26 | 4 | $this->layoutManager->add([ |
|
27 | 4 | 'form'=>$form_content, |
|
28 | 4 | 'content'=>$content, |
|
29 | ]); |
||
30 | |||
31 | 4 | return $this->layoutManager->render(); |
|
32 | } |
||
33 | |||
70 | } |
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: