@@ -71,7 +71,7 @@ |
||
71 | 71 | { |
72 | 72 | $leaps = Time::getleaps(); |
73 | 73 | $lenLeaps = count($leaps); |
74 | - $nleaps = 0; // number of leap seconds prior to gpsTime |
|
74 | + $nleaps = 0; // number of leap seconds prior to gpsTime |
|
75 | 75 | for ($i = 0; $i < $lenLeaps; $i++) { |
76 | 76 | if (!strcmp('unix2gps', $dirFlag)) { |
77 | 77 | if ($gpsTime >= $leaps[$i] - $i) { |
@@ -173,7 +173,7 @@ |
||
173 | 173 | */ |
174 | 174 | public static function dwordToInt32($dword, $endianness = 1, $signedness = 1) |
175 | 175 | { |
176 | - print('endianness: '.$endianness); |
|
176 | + print('endianness: ' . $endianness); |
|
177 | 177 | |
178 | 178 | # unpack hex str to raw bytes |
179 | 179 | $bin = pack("H*", $dword); |
@@ -60,8 +60,9 @@ |
||
60 | 60 | |
61 | 61 | # Determine 2's complement |
62 | 62 | if ($signedness && $int8 >= 0x80) { |
63 | - if (0x80 & $int8) |
|
64 | - return -(($int8 ^ 0xFF) + 1); |
|
63 | + if (0x80 & $int8) { |
|
64 | + return -(($int8 ^ 0xFF) + 1); |
|
65 | + } |
|
65 | 66 | } |
66 | 67 | |
67 | 68 | return $int8; |