@@ -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 |
@@ -236,7 +236,7 @@ |
||
236 | 236 | * |
237 | 237 | * |
238 | 238 | * @see https://github.com/chillerlan/php-qrcode/discussions/121 |
239 | - */ |
|
239 | + */ |
|
240 | 240 | protected bool $imageTransparent = true; |
241 | 241 | |
242 | 242 | /** |
@@ -393,7 +393,7 @@ |
||
393 | 393 | */ |
394 | 394 | protected function set_eccLevel(int $eccLevel):void{ |
395 | 395 | |
396 | - if((0b11 & $eccLevel) !== $eccLevel){ |
|
396 | + if((0b11&$eccLevel) !== $eccLevel){ |
|
397 | 397 | throw new QRCodeException(sprintf('Invalid error correct level: %s', $eccLevel)); |
398 | 398 | } |
399 | 399 |
@@ -70,7 +70,7 @@ |
||
70 | 70 | * @return string|\Imagick |
71 | 71 | */ |
72 | 72 | public function dump(string $file = null){ |
73 | - $file ??= $this->options->cachefile; |
|
73 | + $file ??= $this->options->cachefile; |
|
74 | 74 | $this->imagick = new Imagick; |
75 | 75 | |
76 | 76 | $bgColor = $this->options->imageTransparent ? 'transparent' : 'white'; |