| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class MaskStringFormatter implements Formatter |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @param string|null $string |
||
| 14 | * @param string $character |
||
| 15 | * @param int $index |
||
| 16 | * @param int $length |
||
| 17 | * @param string $encoding |
||
| 18 | */ |
||
| 19 | 5 | public function __construct( |
|
| 20 | public ?string $string = '', |
||
| 21 | public string $character = '*', |
||
| 22 | public int $index = 4, |
||
| 23 | public int $length = -4, |
||
| 24 | public string $encoding = 'UTF-8', |
||
| 25 | ) { |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Mask the string. |
||
| 30 | * |
||
| 31 | * @return string |
||
| 32 | */ |
||
| 33 | 5 | public function format(): string |
|
| 41 | ); |
||
| 42 | } |
||
| 44 |