Total Complexity | 6 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | trait PlaceholderTrait |
||
8 | { |
||
9 | private ?string $placeholder = null; |
||
10 | private bool $usePlaceholder = true; |
||
11 | |||
12 | 1 | public function placeholder(?string $placeholder): self |
|
13 | { |
||
14 | 1 | $new = clone $this; |
|
15 | 1 | $new->placeholder = $placeholder; |
|
16 | 1 | return $new; |
|
17 | } |
||
18 | |||
19 | 3 | public function usePlaceholder(bool $use): self |
|
24 | } |
||
25 | |||
26 | 29 | protected function preparePlaceholderInFormElementTagAttributes(array &$attributes): void |
|
35 | } |
||
36 | } |
||
39 |