Completed
Push — v3.2.x ( 952323...cba5a1 )
by smiley
06:51 queued 05:30
created
src/Data/QRMatrix.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\QRCode\Data;
14 14
 
15
-use chillerlan\QRCode\QRCode;
16 15
 use Closure;
16
+use chillerlan\QRCode\QRCode;
17 17
 
18 18
 use function array_fill, array_key_exists, array_push, array_unshift, count, floor, in_array, max, min, range;
19 19
 
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
 		18 => [6, 30, 56, 82],
63 63
 		19 => [6, 30, 58, 86],
64 64
 		20 => [6, 34, 62, 90],
65
-		21 => [6, 28, 50, 72,  94],
66
-		22 => [6, 26, 50, 74,  98],
65
+		21 => [6, 28, 50, 72, 94],
66
+		22 => [6, 26, 50, 74, 98],
67 67
 		23 => [6, 30, 54, 78, 102],
68 68
 		24 => [6, 28, 54, 80, 106],
69 69
 		25 => [6, 32, 58, 84, 110],
70 70
 		26 => [6, 30, 58, 86, 114],
71 71
 		27 => [6, 34, 62, 90, 118],
72
-		28 => [6, 26, 50, 74,  98, 122],
72
+		28 => [6, 26, 50, 74, 98, 122],
73 73
 		29 => [6, 30, 54, 78, 102, 126],
74 74
 		30 => [6, 26, 52, 78, 104, 130],
75 75
 		31 => [6, 30, 56, 82, 108, 134],
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
 	// ECC level -> mask pattern
130 130
 	protected const formatPattern = [
131
-		[ // L
131
+		[// L
132 132
 			0b111011111000100,
133 133
 			0b111001011110011,
134 134
 			0b111110110101010,
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 			0b110110001000001,
139 139
 			0b110100101110110,
140 140
 		],
141
-		[ // M
141
+		[// M
142 142
 			0b101010000010010,
143 143
 			0b101000100100101,
144 144
 			0b101111001111100,
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 			0b100111110010111,
149 149
 			0b100101010100000,
150 150
 		],
151
-		[ // Q
151
+		[// Q
152 152
 			0b011010101011111,
153 153
 			0b011000001101000,
154 154
 			0b011111100110001,
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 			0b010111011011010,
159 159
 			0b010101111101101,
160 160
 		],
161
-		[ // H
161
+		[// H
162 162
 			0b001011010001001,
163 163
 			0b001001110111110,
164 164
 			0b001110011100111,
@@ -386,8 +386,8 @@  discard block
 block discarded – undo
386 386
 
387 387
 		for($c = 0; $c < 3; $c++){
388 388
 			for($i = 0; $i < 8; $i++){
389
-				$this->set($h[$c][0]     , $h[$c][1] + $i, false, $this::M_SEPARATOR);
390
-				$this->set($v[$c][0] - $i, $v[$c][1]     , false, $this::M_SEPARATOR);
389
+				$this->set($h[$c][0], $h[$c][1] + $i, false, $this::M_SEPARATOR);
390
+				$this->set($v[$c][0] - $i, $v[$c][1], false, $this::M_SEPARATOR);
391 391
 			}
392 392
 		}
393 393
 
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
 			for($i = 0; $i < 18; $i++){
463 463
 				$a = (int)floor($i / 3);
464 464
 				$b = $i % 3 + $this->moduleCount - 8 - 3;
465
-				$v = !$test && (($bits >> $i) & 1) === 1;
465
+				$v = !$test && (($bits >> $i)&1) === 1;
466 466
 
467 467
 				$this->set($b, $a, $v, $this::M_VERSION); // ne
468 468
 				$this->set($a, $b, $v, $this::M_VERSION); // sw
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
 		$bits = $this::formatPattern[QRCode::ECC_MODES[$this->eclevel]][$maskPattern] ?? 0;
486 486
 
487 487
 		for($i = 0; $i < 15; $i++){
488
-			$v = !$test && (($bits >> $i) & 1) === 1;
488
+			$v = !$test && (($bits >> $i)&1) === 1;
489 489
 
490 490
 			if($i < 6){
491 491
 				$this->set(8, $i, $v, $this::M_FORMAT);
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
 		$size              = $this->moduleCount - 1;
568 568
 		$mask              = $this->getMask($this->maskPattern);
569 569
 
570
-		for($i = $size, $y = $size, $inc = -1, $byteIndex = 0, $bitIndex  = 7; $i > 0; $i -= 2){
570
+		for($i = $size, $y = $size, $inc = -1, $byteIndex = 0, $bitIndex = 7; $i > 0; $i -= 2){
571 571
 
572 572
 			if($i === 6){
573 573
 				$i--;
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 						$v = false;
582 582
 
583 583
 						if($byteIndex < $byteCount){
584
-							$v = (($data[$byteIndex] >> $bitIndex) & 1) === 1;
584
+							$v = (($data[$byteIndex] >> $bitIndex)&1) === 1;
585 585
 						}
586 586
 
587 587
 						if($mask($x, $y) === 0){
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
 				$y += $inc;
603 603
 
604 604
 				if($y < 0 || $this->moduleCount <= $y){
605
-					$y   -=  $inc;
605
+					$y   -= $inc;
606 606
 					$inc  = -$inc;
607 607
 
608 608
 					break;
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
 	 */
632 632
 	protected function getMask(int $maskPattern):Closure{
633 633
 
634
-		if((0b111 & $maskPattern) !== $maskPattern){
634
+		if((0b111&$maskPattern) !== $maskPattern){
635 635
 			throw new QRCodeDataException('invalid mask pattern'); // @codeCoverageIgnore
636 636
 		}
637 637
 
Please login to merge, or discard this patch.
src/Output/QRFpdf.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@
 block discarded – undo
14 14
 
15 15
 namespace chillerlan\QRCode\Output;
16 16
 
17
+use FPDF;
17 18
 use chillerlan\QRCode\Data\QRMatrix;
18 19
 use chillerlan\QRCode\QRCodeException;
19 20
 use chillerlan\Settings\SettingsContainerInterface;
20
-use FPDF;
21 21
 
22 22
 use function array_values, class_exists, count, is_array;
23 23
 
Please login to merge, or discard this patch.
src/Data/MaskPatternTester.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 	 * @return int
56 56
 	 */
57 57
 	public function testPattern():int{
58
-		$penalty  = 0;
58
+		$penalty = 0;
59 59
 
60 60
 		for($level = 1; $level <= 4; $level++){
61 61
 			$penalty += call_user_func_array([$this, 'testLevel'.$level], [$this->matrix->matrix(true)]);
Please login to merge, or discard this patch.