@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $byte2 = ord($string[$i + 1]); |
100 | 100 | |
101 | 101 | // byte 1 unused and vendor ranges |
102 | - if($byte1 < 0x81 || ($byte1 > 0x84 && $byte1 < 0x88) || ($byte1 > 0x9f && $byte1 < 0xe0) || $byte1 > 0xea){ |
|
102 | + if($byte1 < 0x81 || ($byte1 > 0x84 && $byte1 < 0x88) || ($byte1 > 0x9f && $byte1 < 0xe0) || $byte1 > 0xea){ |
|
103 | 103 | return false; |
104 | 104 | } |
105 | 105 | |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $len = strlen($this->data); |
129 | 129 | |
130 | 130 | for($i = 0; $i + 1 < $len; $i += 2){ |
131 | - $c = ((0xff & ord($this->data[$i])) << 8) | (0xff & ord($this->data[$i + 1])); |
|
131 | + $c = ((0xff & ord($this->data[$i])) << 8)|(0xff & ord($this->data[$i + 1])); |
|
132 | 132 | |
133 | 133 | if($c >= 0x8140 && $c <= 0x9ffc){ |
134 | 134 | $c -= 0x8140; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $length = $bitBuffer->read(self::getLengthBits($versionNumber)); |
159 | 159 | |
160 | 160 | if($bitBuffer->available() < $length * 13){ |
161 | - throw new QRCodeDataException('not enough bits available'); // @codeCoverageIgnore |
|
161 | + throw new QRCodeDataException('not enough bits available'); // @codeCoverageIgnore |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | // Each character will require 2 bytes. Read the characters as 2-byte pairs and decode as SJIS afterwards |
@@ -168,15 +168,15 @@ discard block |
||
168 | 168 | while($length > 0){ |
169 | 169 | // Each 13 bits encodes a 2-byte character |
170 | 170 | $twoBytes = $bitBuffer->read(13); |
171 | - $assembledTwoBytes = (((int)($twoBytes / 0x0c0)) << 8) | ($twoBytes % 0x0c0); |
|
171 | + $assembledTwoBytes = (((int)($twoBytes / 0x0c0)) << 8)|($twoBytes % 0x0c0); |
|
172 | 172 | |
173 | 173 | $assembledTwoBytes += ($assembledTwoBytes < 0x01f00) |
174 | 174 | ? 0x08140 // In the 0x8140 to 0x9FFC range |
175 | 175 | : 0x0c140; // In the 0xE040 to 0xEBBF range |
176 | 176 | |
177 | 177 | $buffer[$offset] = chr(0xff & ($assembledTwoBytes >> 8)); |
178 | - $buffer[$offset + 1] = chr(0xff & $assembledTwoBytes); |
|
179 | - $offset += 2; |
|
178 | + $buffer[$offset + 1] = chr(0xff&$assembledTwoBytes); |
|
179 | + $offset += 2; |
|
180 | 180 | $length--; |
181 | 181 | } |
182 | 182 |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $len = strlen($this->data); |
132 | 132 | |
133 | 133 | for($i = 0; $i + 1 < $len; $i += 2){ |
134 | - $c = ((0xff & ord($this->data[$i])) << 8) | (0xff & ord($this->data[$i + 1])); |
|
134 | + $c = ((0xff & ord($this->data[$i])) << 8)|(0xff & ord($this->data[$i + 1])); |
|
135 | 135 | |
136 | 136 | if($c >= 0xa1a1 && $c <= 0xaafe){ |
137 | 137 | $c -= 0x0a1a1; |
@@ -171,15 +171,15 @@ discard block |
||
171 | 171 | while($length > 0){ |
172 | 172 | // Each 13 bits encodes a 2-byte character |
173 | 173 | $twoBytes = $bitBuffer->read(13); |
174 | - $assembledTwoBytes = (((int)($twoBytes / 0x060)) << 8) | ($twoBytes % 0x060); |
|
174 | + $assembledTwoBytes = (((int)($twoBytes / 0x060)) << 8)|($twoBytes % 0x060); |
|
175 | 175 | |
176 | 176 | $assembledTwoBytes += ($assembledTwoBytes < 0x00a00) // 0x003BF |
177 | 177 | ? 0x0a1a1 // In the 0xA1A1 to 0xAAFE range |
178 | 178 | : 0x0a6a1; // In the 0xB0A1 to 0xFAFE range |
179 | 179 | |
180 | 180 | $buffer[$offset] = chr(0xff & ($assembledTwoBytes >> 8)); |
181 | - $buffer[$offset + 1] = chr(0xff & $assembledTwoBytes); |
|
182 | - $offset += 2; |
|
181 | + $buffer[$offset + 1] = chr(0xff&$assembledTwoBytes); |
|
182 | + $offset += 2; |
|
183 | 183 | $length--; |
184 | 184 | } |
185 | 185 |