Completed
Push — master ( 839e9e...4e091b )
by Costin
03:53
created

InputComponent::toHtml()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php 
2
3
namespace SoareCostin\BladeFormComponents\FormComponents;
4
5
use Illuminate\Contracts\Support\Htmlable;
6
use SoareCostin\BladeFormComponents\FormElements\Input;
7
8
class InputComponent implements Htmlable
9
{
10
    /** @var SoareCostin\BladeFormComponents\FormElements\Input */
11
    protected $element;
12
13
    public function __construct(array $params = [])
14
    {
15
        $this->element = new Input($params);
0 ignored issues
show
Documentation Bug introduced by
It seems like new \SoareCostin\BladeFo...Elements\Input($params) of type object<SoareCostin\Blade...nts\FormElements\Input> is incompatible with the declared type object<SoareCostin\Blade...nts\FormElements\Input> of property $element.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
16
    }
17
18
    public function toHtml()
19
    {
20
        $theme = config('blade-form-components.theme');
21
22
        return view(
23
            'blade-form-components::themes.'.$theme.'.input', ['element' => $this->element]
24
        );
25
    }
26
}
27