| Total Complexity | 3 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | class ByteValidator implements ValidatorInterface |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * Check byte values |
||
| 26 | * |
||
| 27 | * @param mixed $size Size in bytes |
||
| 28 | * @return bool |
||
| 29 | */ |
||
| 30 | 6 | public function check($size) |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Convert byte values to human readable format |
||
| 37 | * |
||
| 38 | * @param int $size Size in bytes |
||
| 39 | * @param int $precision Precision of returned values |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | 6 | public static function format($size, $precision = 2) |
|
| 55 |