Skip to content

Commit 991287a

Browse files
committed
🚿
1 parent 8276d6d commit 991287a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Common/MaskPattern.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ final class MaskPattern{
7777
*/
7878
public function __construct(int $maskPattern){
7979

80-
if((0b111 & $maskPattern) !== $maskPattern){
80+
if(($maskPattern & 0b111) !== $maskPattern){
8181
throw new QRCodeException('invalid mask pattern');
8282
}
8383

src/Data/QRMatrix.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ public function checkNeighbours(int $x, int $y, int $M_TYPE = null):int{
349349
$ix += $x;
350350
$iy += $y;
351351

352-
// $M_TYPE is given, skip if the field is not the same type
352+
// check if the field is the same type
353353
if($M_TYPE !== null && !$this->checkType($ix, $iy, $M_TYPE)){
354354
continue;
355355
}

0 commit comments

Comments
 (0)