✨ change QRMatrix::checkTypeNotIn() to checkTypeIn()

This commit is contained in:
smiley
2023-03-09 19:08:37 +01:00
parent d21ed9d8ed
commit 61128e4aec
9 changed files with 17 additions and 17 deletions
+5 -5
View File
@@ -236,18 +236,18 @@ class QRMatrix{
}
/**
* 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.
* checks whether the module at ($x, $y) is in the given array of $M_TYPES,
* returns true if a match is found, otherwise false.
*/
public function checkTypeNotIn(int $x, int $y, array $M_TYPES):bool{
public function checkTypeIn(int $x, int $y, array $M_TYPES):bool{
foreach($M_TYPES as $type){
if($this->checkType($x, $y, $type)){
return false;
return true;
}
}
return true;
return false;
}
/**