Completed
Push — master ( 9c4198...455774 )
by smiley
11s
created
src/Data/QRMatrix.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	/**
37 37
 	 * @link http://www.thonky.com/qr-code-tutorial/alignment-pattern-locations
38 38
 	 */
39
-	const alignmentPattern = [ null, // start at 1
39
+	const alignmentPattern = [null, // start at 1
40 40
 		[],
41 41
 		[6, 18],
42 42
 		[6, 22],
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
 		[6, 30, 56, 82],
58 58
 		[6, 30, 58, 86],
59 59
 		[6, 34, 62, 90],
60
-		[6, 28, 50, 72,  94],
61
-		[6, 26, 50, 74,  98],
60
+		[6, 28, 50, 72, 94],
61
+		[6, 26, 50, 74, 98],
62 62
 		[6, 30, 54, 78, 102],
63 63
 		[6, 28, 54, 80, 106],
64 64
 		[6, 32, 58, 84, 110],
65 65
 		[6, 30, 58, 86, 114],
66 66
 		[6, 34, 62, 90, 118],
67
-		[6, 26, 50, 74,  98, 122],
67
+		[6, 26, 50, 74, 98, 122],
68 68
 		[6, 30, 54, 78, 102, 126],
69 69
 		[6, 26, 52, 78, 104, 130],
70 70
 		[6, 30, 56, 82, 108, 134],
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 		// 1-based version index
87 87
 		null,
88 88
 		// no version pattern for QR Codes < 7
89
-		null   , null   , null   , null   , null   , null   , 0x07c94, 0x085bc, 0x09a99, 0x0a4d3,
89
+		null, null, null, null, null, null, 0x07c94, 0x085bc, 0x09a99, 0x0a4d3,
90 90
 		0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6,
91 91
 		0x15683, 0x168c9, 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75,
92 92
 		0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, 0x27541, 0x28c69,
@@ -298,8 +298,8 @@  discard block
 block discarded – undo
298 298
 
299 299
 		for($c = 0; $c < 3; $c++){
300 300
 			for($i = 0; $i < 8; $i++){
301
-				$this->set($h[$c][0]     , $h[$c][1] + $i, false, $this::M_SEPARATOR);
302
-				$this->set($v[$c][0] - $i, $v[$c][1]     , false, $this::M_SEPARATOR);
301
+				$this->set($h[$c][0], $h[$c][1] + $i, false, $this::M_SEPARATOR);
302
+				$this->set($v[$c][0] - $i, $v[$c][1], false, $this::M_SEPARATOR);
303 303
 			}
304 304
 		}
305 305
 
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 			for($i = 0; $i < 18; $i++){
377 377
 				$a = (int)floor($i / 3);
378 378
 				$b = $i % 3 + $this->moduleCount - 8 - 3;
379
-				$v = !$test && (($bits >> $i) & 1) === 1;
379
+				$v = !$test && (($bits >> $i)&1) === 1;
380 380
 
381 381
 				$this->set($b, $a, $v, $this::M_VERSION); // ne
382 382
 				$this->set($a, $b, $v, $this::M_VERSION); // sw
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 		$t    = $this::M_FORMAT;
402 402
 
403 403
 		for($i = 0; $i < 15; $i++){
404
-			$v = !$test && (($bits >> $i) & 1) === 1;
404
+			$v = !$test && (($bits >> $i)&1) === 1;
405 405
 
406 406
 			if($i < 6){
407 407
 				$this->set(8, $i, $v, $t);
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 		}
456 456
 
457 457
 		$this->moduleCount += ($size * 2);
458
-		$r                 = array_fill(0, $this->moduleCount, $t);
458
+		$r = array_fill(0, $this->moduleCount, $t);
459 459
 
460 460
 		for($i = 0; $i < $size; $i++){
461 461
 			array_unshift($this->matrix, $r);
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
 		$byteCount         = count($data);
481 481
 		$size              = $this->moduleCount - 1;
482 482
 
483
-		for($i = $size, $y = $size, $inc = -1, $byteIndex = 0, $bitIndex  = 7; $i > 0; $i -= 2){
483
+		for($i = $size, $y = $size, $inc = -1, $byteIndex = 0, $bitIndex = 7; $i > 0; $i -= 2){
484 484
 
485 485
 			if($i === 6){
486 486
 				$i--;
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 						$v = false;
495 495
 
496 496
 						if($byteIndex < $byteCount){
497
-							$v = (($data[$byteIndex] >> $bitIndex) & 1) === 1;
497
+							$v = (($data[$byteIndex] >> $bitIndex)&1) === 1;
498 498
 						}
499 499
 
500 500
 						if($this->getMask($x, $y, $maskPattern) === 0){
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 				$y += $inc;
516 516
 
517 517
 				if($y < 0 || $this->moduleCount <= $y){
518
-					$y   -=  $inc;
518
+					$y   -= $inc;
519 519
 					$inc  = -$inc;
520 520
 
521 521
 					break;
Please login to merge, or discard this patch.