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