@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | while($i + 1 < $len){ |
| 65 | - $c = ((0xff & ord($string[$i])) << 8) | (0xff & ord($string[$i + 1])); |
|
| 65 | + $c = ((0xff & ord($string[$i])) << 8)|(0xff & ord($string[$i + 1])); |
|
| 66 | 66 | |
| 67 | 67 | if(!($c >= 0x8140 && $c <= 0x9ffc) && !($c >= 0xe040 && $c <= 0xebbf)){ |
| 68 | 68 | return false; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $len = strlen($this->data); |
| 90 | 90 | |
| 91 | 91 | for($i = 0; $i + 1 < $len; $i += 2){ |
| 92 | - $c = ((0xff & ord($this->data[$i])) << 8) | (0xff & ord($this->data[$i + 1])); |
|
| 92 | + $c = ((0xff & ord($this->data[$i])) << 8)|(0xff & ord($this->data[$i + 1])); |
|
| 93 | 93 | |
| 94 | 94 | if($c >= 0x8140 && $c <= 0x9ffC){ |
| 95 | 95 | $c -= 0x8140; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $length = $bitBuffer->read(self::getLengthBits($versionNumber)); |
| 120 | 120 | |
| 121 | 121 | if($bitBuffer->available() < $length * 13){ |
| 122 | - throw new QRCodeDataException('not enough bits available'); // @codeCoverageIgnore |
|
| 122 | + throw new QRCodeDataException('not enough bits available'); // @codeCoverageIgnore |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | $buffer = []; |
@@ -128,15 +128,15 @@ discard block |
||
| 128 | 128 | while($length > 0){ |
| 129 | 129 | // Each 13 bits encodes a 2-byte character |
| 130 | 130 | $twoBytes = $bitBuffer->read(13); |
| 131 | - $assembledTwoBytes = ((int)($twoBytes / 0x0c0) << 8) | ($twoBytes % 0x0c0); |
|
| 131 | + $assembledTwoBytes = ((int)($twoBytes / 0x0c0) << 8)|($twoBytes % 0x0c0); |
|
| 132 | 132 | |
| 133 | 133 | $assembledTwoBytes += ($assembledTwoBytes < 0x01f00) |
| 134 | 134 | ? 0x08140 // In the 0x8140 to 0x9FFC range |
| 135 | 135 | : 0x0c140; // In the 0xE040 to 0xEBBF range |
| 136 | 136 | |
| 137 | 137 | $buffer[$offset] = chr(0xff & ($assembledTwoBytes >> 8)); |
| 138 | - $buffer[$offset + 1] = chr(0xff & $assembledTwoBytes); |
|
| 139 | - $offset += 2; |
|
| 138 | + $buffer[$offset + 1] = chr(0xff&$assembledTwoBytes); |
|
| 139 | + $offset += 2; |
|
| 140 | 140 | $length--; |
| 141 | 141 | } |
| 142 | 142 | |