This commit is contained in:
Dr Masroor Ehsan 2025-01-22 12:59:52 +06:00
parent 6092d3540e
commit d204bfc900
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
use App\Domain\Rule\MatchMode;
final class StringMatcher
final class ContentMatcher
{
public static function match(string $input, string $pattern, MatchMode $mode): bool
{

View File

@ -3,7 +3,7 @@
namespace App\Services\Pacs;
use App\Domain\Rule\MatchMode;
use App\Services\StringMatcher;
use App\Services\ContentMatcher;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\DB;
@ -36,7 +36,7 @@ public static function map(?string $input): array
$input = strtolower($input);
foreach (self::$rules as $pattern) {
if (StringMatcher::match($input, $pattern->name, MatchMode::from($pattern->match_mode))) {
if (ContentMatcher::match($input, $pattern->name, MatchMode::from($pattern->match_mode))) {
return [$pattern->institute_id, $pattern->facility_id];
}
}