From 6694a51316de9c6deb9a180e0cc43bc882d322d4 Mon Sep 17 00:00:00 2001 From: dewanakl Date: Sun, 22 Sep 2024 17:07:41 +0700 Subject: [PATCH] feat: updated data --- src/Aman.php | 13 ++-- src/db/lists.php | 193 +++++++++++++++++++++++++++++++++++++---------- 2 files changed, 162 insertions(+), 44 deletions(-) diff --git a/src/Aman.php b/src/Aman.php index 7e80b3f..f3aba52 100644 --- a/src/Aman.php +++ b/src/Aman.php @@ -9,7 +9,7 @@ class Aman * * @var array $similar */ - private $similar = [ + private array $similar = [ 'a' => '(a|a\.|a\-|4|@|Á|á|À|Â|à|Â|â|Ä|ä|Ã|ã|Å|å|α|Δ|Λ|λ)', 'b' => '(b|b\.|b\-|8|\|3|ß|Β|β)', 'c' => '(c|c\.|c\-|Ç|ç|¢|€|<|\(|{|©)', @@ -23,14 +23,14 @@ class Aman 'k' => '(k|k\.|k\-|Κ|κ)', 'l' => '(l|1\.|l\-|!|\||\]\[|]|£|∫|Ì|Í|Î|Ï)', 'm' => '(m|m\.|m\-)', - 'n' => '(n|n\.|n\-|η|Ν|Π)', - 'o' => '(o|o\.|o\-|0|Ο|ο|Φ|¤|°|ø)', + 'n' => '(n|n\.|n\-|η|Ν|Π|ñ)', + 'o' => '(o|o\.|o\-|0|Ο|ο|Φ|¤|°|ø|ö|ó)', 'p' => '(p|p\.|p\-|ρ|Ρ|¶|þ)', 'q' => '(q|q\.|q\-)', 'r' => '(r|r\.|r\-|®)', 's' => '(s|s\.|s\-|5|\$|§)', 't' => '(t|t\.|t\-|Τ|τ)', - 'u' => '(u|u\.|u\-|υ|µ)', + 'u' => '(u|u\.|u\-|υ|µ|ü|ù)', 'v' => '(v|v\.|v\-|υ|ν)', 'w' => '(w|w\.|w\-|ω|ψ|Ψ)', 'x' => '(x|x\.|x\-|Χ|χ)', @@ -43,14 +43,14 @@ class Aman * * @var array $lists */ - private $lists; + private array $lists; /** * Singleton variable. * * @var Aman|null */ - public static $instance; + public static ?Aman $instance = null; /** * Init object. @@ -60,6 +60,7 @@ class Aman public function __construct() { $this->lists = []; + $lists = (array) @require __DIR__ . '/db/lists.php'; foreach ($lists as $list) { diff --git a/src/db/lists.php b/src/db/lists.php index 3c2597a..dd723b7 100644 --- a/src/db/lists.php +++ b/src/db/lists.php @@ -1,102 +1,219 @@