mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-17 15:21:05 +00:00
:octocat: QRMatrix::checkTypeIn(): convert loop to array_any() call
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user