Total Complexity | 5 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | trait Maskable |
||
6 | { |
||
7 | protected $maskPattern; |
||
8 | protected $maskPlaceholder; |
||
9 | |||
10 | 2 | public function mask(string $pattern, string $placeholder = '∗') |
|
11 | { |
||
12 | 2 | $this->maskPattern = $pattern; |
|
13 | 2 | $this->maskPlaceholder = $placeholder; |
|
14 | |||
15 | 2 | return $this; |
|
16 | } |
||
17 | |||
18 | /** |
||
19 | * @return mixed |
||
20 | */ |
||
21 | 2 | public function getMaskPattern() |
|
22 | { |
||
23 | 2 | return $this->maskPattern; |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * @return mixed |
||
28 | */ |
||
29 | 2 | public function getMaskPlaceholder() |
|
30 | { |
||
31 | 2 | return $this->maskPlaceholder; |
|
32 | } |
||
33 | |||
34 | 3 | public function isMaskable() |
|
37 | } |
||
38 | } |
||
39 |