mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-09-02 05:27:15 +00:00
🚿
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
@@ -463,6 +463,7 @@ class QRMatrix{
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user