| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.0416 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 2 | protected function generateInput(): string |
|
| 34 | { |
||
| 35 | 2 | $value = $this->getAttributeValue(); |
|
| 36 | |||
| 37 | 2 | if (!is_string($value) && $value !== null) { |
|
| 38 | throw new InvalidArgumentException('Password widget must be a string or null value.'); |
||
| 39 | } |
||
| 40 | |||
| 41 | 2 | $tagAttributes = $this->getInputTagAttributes(); |
|
| 42 | |||
| 43 | /** @psalm-suppress MixedArgumentTypeCoercion */ |
||
| 44 | 2 | return Html::passwordInput($this->getInputName(), $value, $tagAttributes)->render(); |
|
| 45 | } |
||
| 47 |