Skip to content

Commit 536ab08

Browse files
committed
fix: improve variable naming in regex replacement for clarity
1 parent f76b480 commit 536ab08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Aman.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ public function __construct()
7878

7979
$this->lists = array_values(array_map(function (string $str): string {
8080

81-
$replace = strval(preg_replace_callback('/[a-z]/i', function (array $matches): string {
82-
return strval(static::similar[strtolower($matches[0])] ?? $matches[0]);
81+
$replace = strval(preg_replace_callback('/[a-z]/i', function (array $mats): string {
82+
return strval(static::similar[strtolower($mats[0])] ?? $mats[0]);
8383
}, $str));
8484

8585
return '/\b' . $replace . '\b/iu';
86-
}, $lists));
86+
}, array_values($lists)));
8787
}
8888

8989
/**

0 commit comments

Comments
 (0)