Total Complexity | 3 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 55.56% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | abstract class Format |
||
12 | { |
||
13 | /** |
||
14 | * Truncate a string and append '…' at the end |
||
15 | * |
||
16 | * @param string $ellipsis the string to indicate truncation happened |
||
17 | * |
||
18 | * @return string truncated string |
||
19 | */ |
||
20 | 5 | public static function truncate(string $string, int $maxLength, string $ellipsis = '…'): string |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * Shortcut to format money |
||
32 | */ |
||
33 | public static function money(Money $money): string |
||
41 |