| Total Complexity | 5 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | final class Utility |
||
| 11 | { |
||
| 12 | 12 | public static function getPostMaxSize(): int |
|
| 13 | { |
||
| 14 | 12 | return self::fromIni('post_max_size'); |
|
| 15 | } |
||
| 16 | |||
| 17 | 1 | public static function getUploadMaxFilesize(): int |
|
| 18 | { |
||
| 19 | 1 | return self::fromIni('upload_max_filesize'); |
|
| 20 | } |
||
| 21 | |||
| 22 | 13 | private static function fromIni(string $key): int |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param int|numeric-string $value |
||
| 29 | */ |
||
| 30 | 2 | public static function toMebibyte(string|int $value): string |
|
| 33 | } |
||
| 34 | } |
||
| 35 |