Text::render()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
1
<?php
2
3
namespace Boduch\Grid\Filters;
4
5
class Text extends Filter
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $operator = FilterOperator::OPERATOR_LIKE;
11
12
    /**
13
     * @return \Illuminate\Support\HtmlString
14
     */
15
    public function render()
16
    {
17
        return $this->getFormBuilder()->input('text', $this->getName(), $this->getInput(),
0 ignored issues
show
Bug introduced by
It seems like $this->getInput() targeting Boduch\Grid\Filters\Filter::getInput() can also be of type array; however, Collective\Html\FormBuilder::input() does only seem to accept string|null, maybe add an additional type check?

This check looks at variables that are passed out again to other methods.

If the outgoing method call has stricter type requirements than the method itself, an issue is raised.

An additional type check may prevent trouble.

Loading history...
18
            array_merge(
19
                ['class' => 'form-control input-sm'],
20
                $this->attr
21
            )
22
        );
23
    }
24
}
25