| Total Complexity | 6 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | trait PlaceholderTrait |
||
| 12 | { |
||
| 13 | private ?string $placeholder = null; |
||
| 14 | private bool $usePlaceholder = true; |
||
| 15 | |||
| 16 | 1 | public function placeholder(?string $placeholder): self |
|
| 17 | { |
||
| 18 | 1 | $new = clone $this; |
|
| 19 | 1 | $new->placeholder = $placeholder; |
|
| 20 | 1 | return $new; |
|
| 21 | } |
||
| 22 | |||
| 23 | 3 | public function usePlaceholder(bool $use): self |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @psalm-param HtmlAttributes $attributes |
||
| 32 | */ |
||
| 33 | 29 | protected function preparePlaceholderInFormElementTagAttributes(array &$attributes): void |
|
| 42 | } |
||
| 43 | } |
||
| 47 |