🚿 rename QRMatrix::checkTypes() to checkTypeNotIn() and switch return value to better reflect what it actually does

This commit is contained in:
smiley
2022-06-06 07:43:16 +02:00
parent 9aad8fbbdf
commit 1f435dfd54
5 changed files with 9 additions and 8 deletions
+5 -4
View File
@@ -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;
}
/**