SubmitComponent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace SoareCostin\BladeFormComponents\FormComponents;
4
5
use Illuminate\Contracts\Support\Htmlable;
6
use SoareCostin\BladeFormComponents\FormElements\Submit;
7
8
class SubmitComponent implements Htmlable
9
{
10
    /** @var \SoareCostin\BladeFormComponents\FormElements\Submit */
11
    protected $element;
12
13
    public function __construct(array $params = [])
14
    {
15
        $this->element = new Submit($params);
16
    }
17
18
    public function toHtml()
19
    {
20
        return view(
21
            'blade-form-components::submit', [
22
                'element' => $this->element,
23
            ]
24
        );
25
    }
26
}
27