:octocat: QRMatrix::checkTypeIn(): convert loop to array_any() call

This commit is contained in:
smiley
2026-03-18 01:23:16 +01:00
parent 88b2f9a98c
commit 63d2a08933
+1 -8
View File
@@ -242,14 +242,7 @@ class QRMatrix{
* @param int[] $M_TYPES
*/
public function checkTypeIn(int $x, int $y, array $M_TYPES):bool{
foreach($M_TYPES as $type){
if($this->checkType($x, $y, $type)){
return true;
}
}
return false;
return array_any($M_TYPES, fn($type) => $this->checkType($x, $y, $type));
}
/**