Test Failed
Push — master ( afe3c2...925f92 )
by smiley
02:41
created
src/Output/QRMarkup.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 	/**
36 36
 	 * @return string
37 37
 	 */
38
-	public function dump() {
38
+	public function dump(){
39 39
 		switch($this->options->type){
40 40
 			case QRCode::OUTPUT_MARKUP_SVG : return $this->toSVG();
41 41
 			case QRCode::OUTPUT_MARKUP_HTML:
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 	/**
36 36
 	 * @return string
37 37
 	 */
38
-	public function dump() {
38
+	public function dump(){
39 39
 		switch($this->options->type){
40 40
 			case QRCode::OUTPUT_MARKUP_SVG : return $this->toSVG();
41 41
 			case QRCode::OUTPUT_MARKUP_HTML:
Please login to merge, or discard this patch.
src/QRDataGenerator.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
 			foreach($range2 as $col){
542 542
 
543 543
 				if(
544
-					    $this->matrix[$row][$col    ]
544
+						$this->matrix[$row][$col    ]
545 545
 					&& !$this->matrix[$row][$col + 1]
546 546
 					&&  $this->matrix[$row][$col + 2]
547 547
 					&&  $this->matrix[$row][$col + 3]
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 			foreach($range2 as $row){
560 560
 
561 561
 				if(
562
-					    $this->matrix[$row    ][$col]
562
+						$this->matrix[$row    ][$col]
563 563
 					&& !$this->matrix[$row + 1][$col]
564 564
 					&&  $this->matrix[$row + 2][$col]
565 565
 					&&  $this->matrix[$row + 3][$col]
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
 				for($row = -2; $row <= 2; $row++){
932 932
 					for($col = -2; $col <= 2; $col++){
933 933
 						$this->matrix[$posI + $row][$posJ + $col] =
934
-							    $row === -2 || $row === 2
934
+								$row === -2 || $row === 2
935 935
 							||  $col === -2
936 936
 							||  $col === 2
937 937
 							|| ($row === 0 && $col === 0);
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 		[1, 26, 19], // L
41 41
 		[1, 26, 16], // M
42 42
 		[1, 26, 13], // Q
43
-		[1, 26,  9], // H
43
+		[1, 26, 9], // H
44 44
 		// 2
45 45
 		[1, 44, 34],
46 46
 		[1, 44, 28],
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
 		[2, 35, 13],
54 54
 		// 4
55 55
 		[1, 100, 80],
56
-		[2,  50, 32],
57
-		[2,  50, 24],
58
-		[4,  25,  9],
56
+		[2, 50, 32],
57
+		[2, 50, 24],
58
+		[4, 25, 9],
59 59
 		// 5
60 60
 		[1, 134, 108],
61
-		[2,  67,  43],
62
-		[2,  33,  15, 2, 34, 16],
63
-		[2,  33,  11, 2, 34, 12],
61
+		[2, 67, 43],
62
+		[2, 33, 15, 2, 34, 16],
63
+		[2, 33, 11, 2, 34, 12],
64 64
 		// 6
65 65
 		[2, 86, 68],
66 66
 		[4, 43, 27],
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
 		[4, 39, 13, 1, 40, 14],
74 74
 		// 8
75 75
 		[2, 121, 97],
76
-		[2,  60, 38, 2, 61, 39],
77
-		[4,  40, 18, 2, 41, 19],
78
-		[4,  40, 14, 2, 41, 15],
76
+		[2, 60, 38, 2, 61, 39],
77
+		[4, 40, 18, 2, 41, 19],
78
+		[4, 40, 14, 2, 41, 15],
79 79
 		// 9
80 80
 		[2, 146, 116],
81
-		[3,  58,  36, 2, 59, 37],
82
-		[4,  36,  16, 4, 37, 17],
83
-		[4,  36,  12, 4, 37, 13],
81
+		[3, 58, 36, 2, 59, 37],
82
+		[4, 36, 16, 4, 37, 17],
83
+		[4, 36, 12, 4, 37, 13],
84 84
 		// 10
85 85
 		[2, 86, 68, 2, 87, 69],
86 86
 		[4, 69, 43, 1, 70, 44],
@@ -109,14 +109,14 @@  discard block
 block discarded – undo
109 109
 		[6, 30, 56, 82],
110 110
 		[6, 30, 58, 86],
111 111
 		[6, 34, 62, 90],
112
-		[6, 28, 50, 72,  94],
113
-		[6, 26, 50, 74,  98],
112
+		[6, 28, 50, 72, 94],
113
+		[6, 26, 50, 74, 98],
114 114
 		[6, 30, 54, 78, 102],
115 115
 		[6, 28, 54, 80, 106],
116 116
 		[6, 32, 58, 84, 110],
117 117
 		[6, 30, 58, 86, 114],
118 118
 		[6, 34, 62, 90, 118],
119
-		[6, 26, 50, 74,  98, 122],
119
+		[6, 26, 50, 74, 98, 122],
120 120
 		[6, 30, 54, 78, 102, 126],
121 121
 		[6, 26, 52, 78, 104, 130],
122 122
 		[6, 30, 56, 82, 108, 134],
@@ -132,29 +132,29 @@  discard block
 block discarded – undo
132 132
 	];
133 133
 
134 134
 	const MAX_BITS = [
135
-		QRCode::TYPE_01 => [128,  152,   72,  104],
136
-		QRCode::TYPE_02 => [224,  272,  128,  176],
137
-		QRCode::TYPE_03 => [352,  440,  208,  272],
138
-		QRCode::TYPE_04 => [512,  640,  288,  384],
139
-		QRCode::TYPE_05 => [688,  864,  368,  496],
140
-		QRCode::TYPE_06 => [864,  1088, 480,  608],
141
-		QRCode::TYPE_07 => [992,  1248, 528,  704],
142
-		QRCode::TYPE_08 => [1232, 1552, 688,  880],
135
+		QRCode::TYPE_01 => [128, 152, 72, 104],
136
+		QRCode::TYPE_02 => [224, 272, 128, 176],
137
+		QRCode::TYPE_03 => [352, 440, 208, 272],
138
+		QRCode::TYPE_04 => [512, 640, 288, 384],
139
+		QRCode::TYPE_05 => [688, 864, 368, 496],
140
+		QRCode::TYPE_06 => [864, 1088, 480, 608],
141
+		QRCode::TYPE_07 => [992, 1248, 528, 704],
142
+		QRCode::TYPE_08 => [1232, 1552, 688, 880],
143 143
 		QRCode::TYPE_09 => [1456, 1856, 800, 1056],
144 144
 		QRCode::TYPE_10 => [1728, 2192, 976, 1232],
145 145
 	];
146 146
 
147 147
 	const MAX_LENGTH = [
148
-		[[ 41,  25,  17,  10], [ 34,  20,  14,   8], [ 27,  16,  11,   7], [ 17,  10,   7,   4]],
149
-		[[ 77,  47,  32,  20], [ 63,  38,  26,  16], [ 48,  29,  20,  12], [ 34,  20,  14,   8]],
150
-		[[127,  77,  53,  32], [101,  61,  42,  26], [ 77,  47,  32,  20], [ 58,  35,  24,  15]],
151
-		[[187, 114,  78,  48], [149,  90,  62,  38], [111,  67,  46,  28], [ 82,  50,  34,  21]],
152
-		[[255, 154, 106,  65], [202, 122,  84,  52], [144,  87,  60,  37], [106,  64,  44,  27]],
153
-		[[322, 195, 134,  82], [255, 154, 106,  65], [178, 108,  74,  45], [139,  84,  58,  36]],
154
-		[[370, 224, 154,  95], [293, 178, 122,  75], [207, 125,  86,  53], [154,  93,  64,  39]],
155
-		[[461, 279, 192, 118], [365, 221, 152,  93], [259, 157, 108,  66], [202, 122,  84,  52]],
156
-		[[552, 335, 230, 141], [432, 262, 180, 111], [312, 189, 130,  80], [235, 143,  98,  60]],
157
-		[[652, 395, 271, 167], [513, 311, 213, 131], [364, 221, 151,  93], [288, 174, 119,  74]],
148
+		[[41, 25, 17, 10], [34, 20, 14, 8], [27, 16, 11, 7], [17, 10, 7, 4]],
149
+		[[77, 47, 32, 20], [63, 38, 26, 16], [48, 29, 20, 12], [34, 20, 14, 8]],
150
+		[[127, 77, 53, 32], [101, 61, 42, 26], [77, 47, 32, 20], [58, 35, 24, 15]],
151
+		[[187, 114, 78, 48], [149, 90, 62, 38], [111, 67, 46, 28], [82, 50, 34, 21]],
152
+		[[255, 154, 106, 65], [202, 122, 84, 52], [144, 87, 60, 37], [106, 64, 44, 27]],
153
+		[[322, 195, 134, 82], [255, 154, 106, 65], [178, 108, 74, 45], [139, 84, 58, 36]],
154
+		[[370, 224, 154, 95], [293, 178, 122, 75], [207, 125, 86, 53], [154, 93, 64, 39]],
155
+		[[461, 279, 192, 118], [365, 221, 152, 93], [259, 157, 108, 66], [202, 122, 84, 52]],
156
+		[[552, 335, 230, 141], [432, 262, 180, 111], [312, 189, 130, 80], [235, 143, 98, 60]],
157
+		[[652, 395, 271, 167], [513, 311, 213, 131], [364, 221, 151, 93], [288, 174, 119, 74]],
158 158
 	];
159 159
 
160 160
 	/**
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 			return false;
314 314
 		}
315 315
 
316
-		$i      = 0;
316
+		$i = 0;
317 317
 		$len = strlen($string);
318 318
 
319 319
 		while($i + 1 < $len){
@@ -512,9 +512,9 @@  discard block
 block discarded – undo
512 512
 				$count = 0;
513 513
 
514 514
 				if(
515
-					   $this->matrix[$row    ][$col    ]
516
-					|| $this->matrix[$row    ][$col + 1]
517
-					|| $this->matrix[$row + 1][$col    ]
515
+					   $this->matrix[$row][$col]
516
+					|| $this->matrix[$row][$col + 1]
517
+					|| $this->matrix[$row + 1][$col]
518 518
 					|| $this->matrix[$row + 1][$col + 1]
519 519
 				){
520 520
 					$count++;
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
 			foreach($range2 as $col){
542 542
 
543 543
 				if(
544
-					    $this->matrix[$row][$col    ]
544
+					    $this->matrix[$row][$col]
545 545
 					&& !$this->matrix[$row][$col + 1]
546 546
 					&&  $this->matrix[$row][$col + 2]
547 547
 					&&  $this->matrix[$row][$col + 3]
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
 			foreach($range2 as $row){
560 560
 
561 561
 				if(
562
-					    $this->matrix[$row    ][$col]
562
+					    $this->matrix[$row][$col]
563 563
 					&& !$this->matrix[$row + 1][$col]
564 564
 					&&  $this->matrix[$row + 2][$col]
565 565
 					&&  $this->matrix[$row + 3][$col]
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 
629 629
 		$range = range(0, 17);
630 630
 		foreach($range as $i){
631
-			$v = !$test && (($bits >> $i) & 1) === 1;
631
+			$v = !$test && (($bits >> $i)&1) === 1;
632 632
 
633 633
 			$a = (int)floor($i / 3);
634 634
 			$b = $i % 3 + $this->pixelCount - 8 - 3;
@@ -647,11 +647,11 @@  discard block
 block discarded – undo
647 647
 	 */
648 648
 	protected function setTypeInfo(bool $test, int $pattern){
649 649
 		$this->setPattern();
650
-		$bits = $this->getBCHTypeInfo(($this->errorCorrectLevel << 3) | $pattern);
650
+		$bits = $this->getBCHTypeInfo(($this->errorCorrectLevel << 3)|$pattern);
651 651
 
652 652
 		$range = range(0, 14);
653 653
 		foreach($range as $i){
654
-			$mod = !$test && (($bits >> $i) & 1) === 1;
654
+			$mod = !$test && (($bits >> $i)&1) === 1;
655 655
 
656 656
 			switch(true){
657 657
 				case $i < 6:
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
 
758 758
 			foreach($dcdata[$key] as $a => &$_dcdata){
759 759
 				$bdata   = $this->bitBuffer->buffer;
760
-				$_dcdata = 0xff & $bdata[$a + $offset];
760
+				$_dcdata = 0xff&$bdata[$a + $offset];
761 761
 			}
762 762
 
763 763
 			$offset += $rsBlockDataCount;
@@ -841,7 +841,7 @@  discard block
 block discarded – undo
841 841
 						$dark = false;
842 842
 
843 843
 						if($byteIndex < $dataCount){
844
-							$dark = (($data[$byteIndex] >> $bitIndex) & 1) === 1;
844
+							$dark = (($data[$byteIndex] >> $bitIndex)&1) === 1;
845 845
 						}
846 846
 
847 847
 						$a = $row + $_col;
Please login to merge, or discard this patch.
src/QRCode.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,15 +40,15 @@
 block discarded – undo
40 40
 	const ERROR_CORRECT_LEVEL_H = 2; // 30%.
41 41
 
42 42
 	// max bits @ ec level L:07 M:15 Q:25 H:30 %
43
-	const TYPE_01 =  1; //  152  128  104   72
44
-	const TYPE_02 =  2; //  272  224  176  128
45
-	const TYPE_03 =  3; //  440  352  272  208
46
-	const TYPE_04 =  4; //  640  512  384  288
47
-	const TYPE_05 =  5; //  864  688  496  368
48
-	const TYPE_06 =  6; // 1088  864  608  480
49
-	const TYPE_07 =  7; // 1248  992  704  528
50
-	const TYPE_08 =  8; // 1552 1232  880  688
51
-	const TYPE_09 =  9; // 1856 1456 1056  800
43
+	const TYPE_01 = 1; //  152  128  104   72
44
+	const TYPE_02 = 2; //  272  224  176  128
45
+	const TYPE_03 = 3; //  440  352  272  208
46
+	const TYPE_04 = 4; //  640  512  384  288
47
+	const TYPE_05 = 5; //  864  688  496  368
48
+	const TYPE_06 = 6; // 1088  864  608  480
49
+	const TYPE_07 = 7; // 1248  992  704  528
50
+	const TYPE_08 = 8; // 1552 1232  880  688
51
+	const TYPE_09 = 9; // 1856 1456 1056  800
52 52
 	const TYPE_10 = 10; // 2192 1728 1232  976
53 53
 
54 54
 	/**
Please login to merge, or discard this patch.