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