| Total Complexity | 4 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Text extends FieldAbstract |
||
| 12 | { |
||
| 13 | 14 | public function getTag(): string |
|
| 14 | { |
||
| 15 | 14 | return 'input'; |
|
| 16 | } |
||
| 17 | |||
| 18 | 38 | public function init() |
|
| 19 | { |
||
| 20 | 38 | $this->setAttribute('type', 'text'); |
|
| 21 | 38 | $this->setAttribute('class', 'form-control'); |
|
| 22 | 38 | $stringTrim = new FilterAdapterZf(new StringTrim()); |
|
| 23 | 38 | $stripTags = new FilterAdapterZf(new StripTags()); |
|
| 24 | 38 | $this->addFilter($stringTrim); |
|
| 25 | 38 | $this->addFilter($stripTags); |
|
| 26 | } |
||
| 27 | |||
| 28 | 1 | public function getPlaceholder(): string |
|
| 29 | { |
||
| 30 | 1 | return $this->getAttribute('placeholder'); |
|
| 31 | } |
||
| 32 | |||
| 33 | 6 | public function setPlaceholder(string $placeholder): void |
|
| 36 | } |
||
| 37 | } |
||
| 38 |