mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-29 19:48:17 +00:00
🚿 rename QRMatrix::checkTypes() to checkTypeNotIn() and switch return value to better reflect what it actually does
This commit is contained in:
@@ -211,17 +211,18 @@ class QRMatrix{
|
||||
}
|
||||
|
||||
/**
|
||||
* checks whether a module matches one of the given $M_TYPES
|
||||
* checks whether the module at ($x, $y) is not in the given array of $M_TYPES,
|
||||
* returns true if no matches are found, otherwise false.
|
||||
*/
|
||||
public function checkTypes(int $x, int $y, array $M_TYPES):bool{
|
||||
public function checkTypeNotIn(int $x, int $y, array $M_TYPES):bool{
|
||||
|
||||
foreach($M_TYPES as $type){
|
||||
if($this->checkType($x, $y, $type)){
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user