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