mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-26 18:28:12 +00:00
Merge branch 'master' into php-7.4
# Conflicts: # composer.json # src/Output/QROutputAbstract.php # src/QROptionsTrait.php
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
|
||||
namespace chillerlan\QRCode\Data;
|
||||
|
||||
use function abs, call_user_func;
|
||||
|
||||
/**
|
||||
* The sole purpose of this class is to receive a QRMatrix object and run the pattern tests on it.
|
||||
*
|
||||
@@ -46,7 +48,7 @@ class MaskPatternTester{
|
||||
$penalty = 0;
|
||||
|
||||
for($level = 1; $level <= 4; $level++){
|
||||
$penalty += \call_user_func([$this, 'testLevel'.$level]);
|
||||
$penalty += call_user_func([$this, 'testLevel'.$level]);
|
||||
}
|
||||
|
||||
return (int)$penalty;
|
||||
@@ -194,7 +196,7 @@ class MaskPatternTester{
|
||||
}
|
||||
}
|
||||
|
||||
return (\abs(100 * $count / $this->moduleCount / $this->moduleCount - 50) / 5) * 10;
|
||||
return (abs(100 * $count / $this->moduleCount / $this->moduleCount - 50) / 5) * 10;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user