| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | final class UInt64 |
||
| 17 | { |
||
| 18 | public function __construct( |
||
| 22 | } |
||
| 23 | |||
| 24 | public function __toString() |
||
| 25 | { |
||
| 26 | $hi_hex = str_pad(base_convert((string)$this->hi, 10, 16), 8, '0', STR_PAD_LEFT); |
||
| 27 | $lo_hex = str_pad(base_convert((string)$this->lo, 10, 16), 8, '0', STR_PAD_LEFT); |
||
| 28 | return base_convert($hi_hex . $lo_hex, 16, 10); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * do the wrong thing |
||
| 33 | */ |
||
| 34 | public function toInt(): int |
||
| 35 | { |
||
| 36 | return (int)(string)$this; |
||
| 37 | } |
||
| 38 | |||
| 39 | public function checkBitSet(int $bit_pos): bool |
||
| 43 | } |
||
| 44 | } |
||
| 45 |