Passed
Push — main ( da7af7...cde2af )
by smiley
02:10
created
src/Data/QRMatrix.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 			$matrix[$y] = [];
121 121
 
122 122
 			foreach($row as $x => $val){
123
-				$matrix[$y][$x] = ($val & $this::IS_DARK) === $this::IS_DARK;
123
+				$matrix[$y][$x] = ($val&$this::IS_DARK) === $this::IS_DARK;
124 124
 			}
125 125
 		}
126 126
 
@@ -130,21 +130,21 @@  discard block
 block discarded – undo
130 130
 	/**
131 131
 	 * Returns the current version number
132 132
 	 */
133
-	public function version():?Version{
133
+	public function version(): ?Version{
134 134
 		return $this->version;
135 135
 	}
136 136
 
137 137
 	/**
138 138
 	 * Returns the current ECC level
139 139
 	 */
140
-	public function eccLevel():?EccLevel{
140
+	public function eccLevel(): ?EccLevel{
141 141
 		return $this->eccLevel;
142 142
 	}
143 143
 
144 144
 	/**
145 145
 	 * Returns the current mask pattern
146 146
 	 */
147
-	public function maskPattern():?MaskPattern{
147
+	public function maskPattern(): ?MaskPattern{
148 148
 		return $this->maskPattern;
149 149
 	}
150 150
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	public function set(int $x, int $y, bool $value, int $M_TYPE):self{
179 179
 
180 180
 		if(isset($this->matrix[$y][$x])){
181
-			$this->matrix[$y][$x] = $M_TYPE | ($value ? $this::IS_DARK : 0);
181
+			$this->matrix[$y][$x] = $M_TYPE|($value ? $this::IS_DARK : 0);
182 182
 		}
183 183
 
184 184
 		return $this;
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 			return false;
208 208
 		}
209 209
 
210
-		return ($this->matrix[$y][$x] & $M_TYPE) === $M_TYPE;
210
+		return ($this->matrix[$y][$x]&$M_TYPE) === $M_TYPE;
211 211
 	}
212 212
 
213 213
 	/**
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
 
303 303
 		for($c = 0; $c < 3; $c++){
304 304
 			for($i = 0; $i < 8; $i++){
305
-				$this->set($h[$c][0]     , $h[$c][1] + $i, false, $this::M_SEPARATOR);
306
-				$this->set($v[$c][0] - $i, $v[$c][1]     , false, $this::M_SEPARATOR);
305
+				$this->set($h[$c][0], $h[$c][1] + $i, false, $this::M_SEPARATOR);
306
+				$this->set($v[$c][0] - $i, $v[$c][1], false, $this::M_SEPARATOR);
307 307
 			}
308 308
 		}
309 309
 
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 		foreach($this->matrix as $y => $row){
528 528
 			foreach($row as $x => $val){
529 529
 				// out of bounds, skip
530
-				if($x < $start || $y < $start ||$x >= $end || $y >= $end){
530
+				if($x < $start || $y < $start || $x >= $end || $y >= $end){
531 531
 					continue;
532 532
 				}
533 533
 				// a match
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 
596 596
 		foreach($this->matrix as $y => $row){
597 597
 			foreach($row as $x => $val){
598
-				if($mask($x, $y) && ($val & $this::M_DATA) === $this::M_DATA){
598
+				if($mask($x, $y) && ($val&$this::M_DATA) === $this::M_DATA){
599 599
 					$this->flip($x, $y);
600 600
 				}
601 601
 			}
Please login to merge, or discard this patch.