Text   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 20
rs 10
wmc 1
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 9 1
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