Conditions | 2 |
Paths | 1 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public function render() |
||
36 | { |
||
37 | $this->initPlainInput(); |
||
38 | |||
39 | $this->prepend('<i class="fa '.$this->icon.' fa-fw"></i>') |
||
40 | ->defaultAttribute('type', 'text') |
||
41 | ->defaultAttribute('id', $this->id) |
||
42 | ->defaultAttribute('name', $this->elementName ?: $this->formatName($this->column)) |
||
|
|||
43 | ->defaultAttribute('value', old($this->column, $this->value())) |
||
44 | ->defaultAttribute('class', 'form-control '.$this->getElementClassString()) |
||
45 | ->defaultAttribute('placeholder', $this->getPlaceholder()); |
||
46 | |||
47 | $this->addVariables([ |
||
48 | 'prepend' => $this->prepend, |
||
49 | 'append' => $this->append, |
||
50 | ]); |
||
51 | |||
52 | return parent::render(); |
||
53 | } |
||
54 | } |
||
55 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.