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