| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 68 | public function getMachineByteOrder() |
||
| 69 | { |
||
| 70 | if (null === static::$machineByteOrder) { |
||
| 71 | static::$machineByteOrder = ByteOrder::BIG_ENDIAN; |
||
| 72 | |||
| 73 | list(, $value) = unpack('l*', "\x01\x00\x00\x00"); |
||
| 74 | if (1 === $value) { |
||
| 75 | static::$machineByteOrder = ByteOrder::LITTLE_ENDIAN; |
||
| 76 | } |
||
| 77 | } |
||
| 78 | |||
| 79 | return static::$machineByteOrder; |
||
| 80 | } |
||
| 81 | } |
||
| 82 |