Total Complexity | 5 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class Helper |
||
15 | { |
||
16 | /** |
||
17 | * round a number to nearest even number |
||
18 | * |
||
19 | * @param float $number |
||
20 | * @return int |
||
21 | */ |
||
22 | public static function roundToEven(float $number): int |
||
23 | { |
||
24 | return (($number = intval($number)) % 2 == 0) ? $number : $number + 1; |
||
25 | } |
||
26 | |||
27 | |||
28 | /** |
||
29 | * @param $dirname |
||
30 | */ |
||
31 | public static function makeDir($dirname): void |
||
35 | } |
||
36 | } |
||
37 | |||
38 | public static function randomString($length = 10) |
||
42 | |||
43 | } |
||
44 | } |