@@ -86,9 +86,9 @@ |
||
86 | 86 | $matrix = $this->matrix->matrix(); |
87 | 87 | |
88 | 88 | $svg = \sprintf($this->svgHeader, $this->options->cssClass, $this->options->svgViewBoxSize ?? $this->moduleCount) |
89 | - .$this->options->eol |
|
90 | - .'<defs>'.$this->options->svgDefs.'</defs>' |
|
91 | - .$this->options->eol; |
|
89 | + .$this->options->eol |
|
90 | + .'<defs>'.$this->options->svgDefs.'</defs>' |
|
91 | + .$this->options->eol; |
|
92 | 92 | |
93 | 93 | foreach($this->moduleValues as $M_TYPE => $value){ |
94 | 94 | $path = ''; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $len = \strlen($data); |
47 | 47 | |
48 | 48 | for($i = 0; $i + 1 < $len; $i += 2){ |
49 | - $c = ((0xff & \ord($data[$i])) << 8) | (0xff & \ord($data[$i + 1])); |
|
49 | + $c = ((0xff&\ord($data[$i])) << 8)|(0xff&\ord($data[$i + 1])); |
|
50 | 50 | |
51 | 51 | if(0x8140 <= $c && $c <= 0x9FFC){ |
52 | 52 | $c -= 0x8140; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | throw new QRCodeDataException('illegal char at '.($i + 1).' ['.$c.']'); |
59 | 59 | } |
60 | 60 | |
61 | - $this->bitBuffer->put((($c >> 8) & 0xff) * 0xC0 + ($c & 0xff), 13); |
|
61 | + $this->bitBuffer->put((($c >> 8)&0xff) * 0xC0 + ($c&0xff), 13); |
|
62 | 62 | |
63 | 63 | } |
64 | 64 |
@@ -58,14 +58,14 @@ discard block |
||
58 | 58 | [6, 30, 56, 82], |
59 | 59 | [6, 30, 58, 86], |
60 | 60 | [6, 34, 62, 90], |
61 | - [6, 28, 50, 72, 94], |
|
62 | - [6, 26, 50, 74, 98], |
|
61 | + [6, 28, 50, 72, 94], |
|
62 | + [6, 26, 50, 74, 98], |
|
63 | 63 | [6, 30, 54, 78, 102], |
64 | 64 | [6, 28, 54, 80, 106], |
65 | 65 | [6, 32, 58, 84, 110], |
66 | 66 | [6, 30, 58, 86, 114], |
67 | 67 | [6, 34, 62, 90, 118], |
68 | - [6, 26, 50, 74, 98, 122], |
|
68 | + [6, 26, 50, 74, 98, 122], |
|
69 | 69 | [6, 30, 54, 78, 102, 126], |
70 | 70 | [6, 26, 52, 78, 104, 130], |
71 | 71 | [6, 30, 56, 82, 108, 134], |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | // 1-based version index |
88 | 88 | null, |
89 | 89 | // no version pattern for QR Codes < 7 |
90 | - null , null , null , null , null , null , 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, |
|
90 | + null, null, null, null, null, null, 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, |
|
91 | 91 | 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, |
92 | 92 | 0x15683, 0x168c9, 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, |
93 | 93 | 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, 0x27541, 0x28c69, |
@@ -299,8 +299,8 @@ discard block |
||
299 | 299 | |
300 | 300 | for($c = 0; $c < 3; $c++){ |
301 | 301 | for($i = 0; $i < 8; $i++){ |
302 | - $this->set($h[$c][0] , $h[$c][1] + $i, false, $this::M_SEPARATOR); |
|
303 | - $this->set($v[$c][0] - $i, $v[$c][1] , false, $this::M_SEPARATOR); |
|
302 | + $this->set($h[$c][0], $h[$c][1] + $i, false, $this::M_SEPARATOR); |
|
303 | + $this->set($v[$c][0] - $i, $v[$c][1], false, $this::M_SEPARATOR); |
|
304 | 304 | } |
305 | 305 | } |
306 | 306 | |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | for($i = 0; $i < 18; $i++){ |
378 | 378 | $a = (int)\floor($i / 3); |
379 | 379 | $b = $i % 3 + $this->moduleCount - 8 - 3; |
380 | - $v = !$test && (($bits >> $i) & 1) === 1; |
|
380 | + $v = !$test && (($bits >> $i)&1) === 1; |
|
381 | 381 | |
382 | 382 | $this->set($b, $a, $v, $this::M_VERSION); // ne |
383 | 383 | $this->set($a, $b, $v, $this::M_VERSION); // sw |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | $t = $this::M_FORMAT; |
403 | 403 | |
404 | 404 | for($i = 0; $i < 15; $i++){ |
405 | - $v = !$test && (($bits >> $i) & 1) === 1; |
|
405 | + $v = !$test && (($bits >> $i)&1) === 1; |
|
406 | 406 | |
407 | 407 | if($i < 6){ |
408 | 408 | $this->set(8, $i, $v, $t); |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | } |
457 | 457 | |
458 | 458 | $this->moduleCount += ($size * 2); |
459 | - $r = \array_fill(0, $this->moduleCount, $t); |
|
459 | + $r = \array_fill(0, $this->moduleCount, $t); |
|
460 | 460 | |
461 | 461 | for($i = 0; $i < $size; $i++){ |
462 | 462 | \array_unshift($this->matrix, $r); |
@@ -481,7 +481,7 @@ discard block |
||
481 | 481 | $byteCount = \count($data); |
482 | 482 | $size = $this->moduleCount - 1; |
483 | 483 | |
484 | - for($i = $size, $y = $size, $inc = -1, $byteIndex = 0, $bitIndex = 7; $i > 0; $i -= 2){ |
|
484 | + for($i = $size, $y = $size, $inc = -1, $byteIndex = 0, $bitIndex = 7; $i > 0; $i -= 2){ |
|
485 | 485 | |
486 | 486 | if($i === 6){ |
487 | 487 | $i--; |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | $v = false; |
496 | 496 | |
497 | 497 | if($byteIndex < $byteCount){ |
498 | - $v = (($data[$byteIndex] >> $bitIndex) & 1) === 1; |
|
498 | + $v = (($data[$byteIndex] >> $bitIndex)&1) === 1; |
|
499 | 499 | } |
500 | 500 | |
501 | 501 | if($this->getMask($x, $y, $maskPattern) === 0){ |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | $y += $inc; |
517 | 517 | |
518 | 518 | if($y < 0 || $this->moduleCount <= $y){ |
519 | - $y -= $inc; |
|
519 | + $y -= $inc; |
|
520 | 520 | $inc = -$inc; |
521 | 521 | |
522 | 522 | break; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @return int |
54 | 54 | */ |
55 | 55 | public function testPattern():int{ |
56 | - $penalty = 0; |
|
56 | + $penalty = 0; |
|
57 | 57 | |
58 | 58 | for($level = 1; $level <= 4; $level++){ |
59 | 59 | $penalty += \call_user_func([$this, 'testLevel'.$level]); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | if($x <= $this->moduleCount - 7){ |
166 | 166 | if( |
167 | - $this->matrix->check($x , $y) |
|
167 | + $this->matrix->check($x, $y) |
|
168 | 168 | && !$this->matrix->check($x + 1, $y) |
169 | 169 | && $this->matrix->check($x + 2, $y) |
170 | 170 | && $this->matrix->check($x + 3, $y) |
@@ -293,7 +293,7 @@ |
||
293 | 293 | $this->dcdata[$key] = \array_fill(0, $dcCount, null); |
294 | 294 | |
295 | 295 | foreach($this->dcdata[$key] as $a => $_z){ |
296 | - $this->dcdata[$key][$a] = 0xff & $this->bitBuffer->buffer[$a + $offset]; |
|
296 | + $this->dcdata[$key][$a] = 0xff&$this->bitBuffer->buffer[$a + $offset]; |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | [$num, $add] = $this->poly($key, $ecCount); |