Passed
Push — master ( 8ef55e...136e58 )
by smiley
03:26
created
src/Output/QRImage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
 			foreach($row as $c => $pixel){
64 64
 				if($pixel){
65 65
 					imagefilledrectangle($image,
66
-						$this->options->marginSize +  $c      * $this->options->pixelSize,
67
-						$this->options->marginSize +  $r      * $this->options->pixelSize,
66
+						$this->options->marginSize + $c * $this->options->pixelSize,
67
+						$this->options->marginSize + $r * $this->options->pixelSize,
68 68
 						$this->options->marginSize + ($c + 1) * $this->options->pixelSize - 1,
69 69
 						$this->options->marginSize + ($r + 1) * $this->options->pixelSize - 1,
70 70
 						$foreground);
Please login to merge, or discard this patch.
src/Output/QROutputAbstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 			$this->options = new $this->optionsInterface;
54 54
 		}
55 55
 
56
-		if(is_array($this->types) && !in_array($this->options->type, $this->types , true)){
56
+		if(is_array($this->types) && !in_array($this->options->type, $this->types, true)){
57 57
 			throw new QRCodeOutputException('Invalid output type!');
58 58
 		}
59 59
 
Please login to merge, or discard this patch.
src/Output/QRMarkup.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
 		// svg header
84 84
 		$svg = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'.$length.'" height="'.$length.'" viewBox="0 0 '.$length.' '.$length.'" style="background-color:'.$this->options->bgColor.'">'.$this->options->eol.
85
-		       '<defs><style>.'.$class.'{fill:'.$this->options->fgColor.'} rect{shape-rendering:crispEdges}</style></defs>'.$this->options->eol;
85
+			   '<defs><style>.'.$class.'{fill:'.$this->options->fgColor.'} rect{shape-rendering:crispEdges}</style></defs>'.$this->options->eol;
86 86
 
87 87
 		// svg body
88 88
 		foreach($this->matrix as $r => $row){
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 				}
101 101
 				elseif($from >= 0){
102 102
 					$svg .= '<rect x="'.($from * $this->options->pixelSize + $this->options->marginSize).'" y="'.($r * $this->options->pixelSize + $this->options->marginSize)
103
-					        .'" width="'.($this->options->pixelSize * $count).'" height="'.$this->options->pixelSize.'" class="'.$class.'" />'.$this->options->eol;
103
+							.'" width="'.($this->options->pixelSize * $count).'" height="'.$this->options->pixelSize.'" class="'.$class.'" />'.$this->options->eol;
104 104
 
105 105
 					// reset count
106 106
 					$from  = -1;
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 			// close off the row, if applicable
112 112
 			if($from >= 0){
113 113
 				$svg .= '<rect x="'.($from * $this->options->pixelSize + $this->options->marginSize).'" y="'.($r * $this->options->pixelSize + $this->options->marginSize)
114
-				        .'" width="'.($this->options->pixelSize * $count).'" height="'.$this->options->pixelSize.'" class="'.$class.'" />'.$this->options->eol;
114
+						.'" width="'.($this->options->pixelSize * $count).'" height="'.$this->options->pixelSize.'" class="'.$class.'" />'.$this->options->eol;
115 115
 			}
116 116
 		}
117 117
 
Please login to merge, or discard this patch.
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/Data/QRDataInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 	 * @param \chillerlan\QRCode\BitBuffer $buffer
26 26
 	 * @return void
27 27
 	 */
28
-	public function write(BitBuffer &$buffer);
28
+	public function write(BitBuffer&$buffer);
29 29
 
30 30
 	/**
31 31
 	 * @param $type
Please login to merge, or discard this patch.
src/Data/Kanji.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 	 * @return void
36 36
 	 * @throws \chillerlan\QRCode\Data\QRCodeDataException
37 37
 	 */
38
-	public function write(BitBuffer &$buffer){
38
+	public function write(BitBuffer&$buffer){
39 39
 
40 40
 		$i = 0;
41 41
 		while($i + 1 < $this->dataLength){
Please login to merge, or discard this patch.
src/Data/AlphaNum.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 	 *
47 47
 	 * @return void
48 48
 	 */
49
-	public function write(BitBuffer &$buffer){
49
+	public function write(BitBuffer&$buffer){
50 50
 		$i = 0;
51 51
 
52 52
 		while($i + 1 < $this->dataLength){
Please login to merge, or discard this patch.
src/Data/Number.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 	 *
35 35
 	 * @return void
36 36
 	 */
37
-	public function write(BitBuffer &$buffer){
37
+	public function write(BitBuffer&$buffer){
38 38
 		$i = 0;
39 39
 
40 40
 		while($i + 2 < $this->dataLength){
Please login to merge, or discard this patch.
src/Data/Byte.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 	 *
35 35
 	 * @return void
36 36
 	 */
37
-	public function write(BitBuffer &$buffer){
37
+	public function write(BitBuffer&$buffer){
38 38
 		$i = 0;
39 39
 		while($i < $this->dataLength){
40 40
 			$buffer->put(ord($this->data[$i]), 8);
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.