Skip to content

Commit

Permalink
🚿
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Nov 21, 2024
1 parent c4cd1c9 commit 4748411
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Common/MaskPattern.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
1 change: 1 addition & 0 deletions src/Data/QRMatrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 4748411

Please sign in to comment.