Total Complexity | 6 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | trait PlaceholderTrait |
||
11 | { |
||
12 | private ?string $placeholder = null; |
||
13 | private bool $usePlaceholder = true; |
||
14 | |||
15 | 1 | public function placeholder(?string $placeholder): self |
|
16 | { |
||
17 | 1 | $new = clone $this; |
|
18 | 1 | $new->placeholder = $placeholder; |
|
19 | 1 | return $new; |
|
20 | } |
||
21 | |||
22 | 3 | public function usePlaceholder(bool $use): self |
|
23 | { |
||
24 | 3 | $new = clone $this; |
|
25 | 3 | $new->usePlaceholder = $use; |
|
26 | 3 | return $new; |
|
27 | } |
||
28 | |||
29 | 47 | protected function preparePlaceholderInInputTagAttributes(array &$attributes): void |
|
38 | } |
||
39 | } |
||
40 | } |
||
42 |