From 47484114d90b121b195084affefdc47310855ec1 Mon Sep 17 00:00:00 2001 From: smiley Date: Thu, 21 Nov 2024 17:06:29 +0100 Subject: [PATCH] :shower: --- src/Common/MaskPattern.php | 2 +- src/Data/QRMatrix.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Common/MaskPattern.php b/src/Common/MaskPattern.php index 8441a7f53..5c3ea93c1 100644 --- a/src/Common/MaskPattern.php +++ b/src/Common/MaskPattern.php @@ -77,7 +77,7 @@ final class MaskPattern{ */ public function __construct(int $maskPattern){ - if((0b111 & $maskPattern) !== $maskPattern){ + if(($maskPattern & 0b111) !== $maskPattern){ throw new QRCodeException('invalid mask pattern'); } diff --git a/src/Data/QRMatrix.php b/src/Data/QRMatrix.php index aff79d6f8..e32633a99 100755 --- a/src/Data/QRMatrix.php +++ b/src/Data/QRMatrix.php @@ -463,6 +463,7 @@ public function setSeparators():self{ for($c = 0; $c < 3; $c++){ for($i = 0; $i < 8; $i++){ + // phpcs:ignore $this->set( $h[$c][0] , ($h[$c][1] + $i), false, $this::M_SEPARATOR); $this->set(($v[$c][0] - $i), $v[$c][1] , false, $this::M_SEPARATOR); }