| Total Complexity | 6 | 
| Total Lines | 50 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 6 | abstract class Helpers | ||
| 7 | { | ||
| 8 | |||
| 9 | /** | ||
| 10 | * Helper constructor. | ||
| 11 | */ | ||
| 12 | public function __construct() | ||
| 13 |      { | ||
| 14 | |||
| 15 | } | ||
| 16 | |||
| 17 | /** | ||
| 18 | * @param string $string | ||
| 19 | * @param int $limit | ||
| 20 | * @return string | ||
| 21 | */ | ||
| 22 | protected function str_limit_chars(string $string, int $limit): string | ||
| 31 | } | ||
| 32 | |||
| 33 | /** | ||
| 34 | * @param string $input | ||
| 35 | * @param int $pad_length | ||
| 36 | * @param string $pad_string | ||
| 37 | * @param int $pad_style | ||
| 38 | * @param string $encoding | ||
| 39 | * @return string | ||
| 40 | */ | ||
| 41 | protected function mb_str_pad(string $input, int $pad_length, string $pad_string=" ", int $pad_style=STR_PAD_RIGHT, string $encoding="UTF-8"): string | ||
| 42 |      { | ||
| 43 | return str_pad($input, strlen($input)-mb_strlen($input,$encoding)+$pad_length, $pad_string, $pad_style); | ||
| 44 | } | ||
| 45 | |||
| 46 | /** | ||
| 47 | * @param string $date | ||
| 48 | * @param string $format | ||
| 49 | * @return string | ||
| 50 | * @throws Exception | ||
| 51 | */ | ||
| 52 | protected function date_fmt(?string $date, string $format = "Ymd"): string | ||
| 56 | } | ||
| 57 | } | ||
| 58 | |||
| 60 |