From 63d2a08933196d31bb3e99db52506e1f51f3fa08 Mon Sep 17 00:00:00 2001 From: smiley Date: Wed, 18 Mar 2026 01:23:16 +0100 Subject: [PATCH] :octocat: QRMatrix::checkTypeIn(): convert loop to array_any() call --- src/Data/QRMatrix.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Data/QRMatrix.php b/src/Data/QRMatrix.php index 47a8c2290..aa08b6cc5 100755 --- a/src/Data/QRMatrix.php +++ b/src/Data/QRMatrix.php @@ -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)); } /**