mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-28 14:47:10 +00:00
:octocat: mask pattern testing performance improvement
This commit is contained in:
@@ -181,14 +181,10 @@ class QRMatrix{
|
||||
return $this->matrix;
|
||||
}
|
||||
|
||||
$matrix = [];
|
||||
$matrix = $this->matrix;
|
||||
|
||||
for($y = 0; $y < $this->moduleCount; $y++){
|
||||
$matrix[$y] = [];
|
||||
|
||||
for($x = 0; $x < $this->moduleCount; $x++){
|
||||
$matrix[$y][$x] = $this->checkType($x, $y, $this::IS_DARK);
|
||||
}
|
||||
foreach($matrix as &$row){
|
||||
$row = array_map([$this, 'isDark'], $row);
|
||||
}
|
||||
|
||||
return $matrix;
|
||||
|
||||
Reference in New Issue
Block a user