SubmitComponent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 6
c 1
b 0
f 1
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A toHtml() 0 5 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