minor
This commit is contained in:
parent
6092d3540e
commit
d204bfc900
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
use App\Domain\Rule\MatchMode;
|
use App\Domain\Rule\MatchMode;
|
||||||
|
|
||||||
final class StringMatcher
|
final class ContentMatcher
|
||||||
{
|
{
|
||||||
public static function match(string $input, string $pattern, MatchMode $mode): bool
|
public static function match(string $input, string $pattern, MatchMode $mode): bool
|
||||||
{
|
{
|
@ -3,7 +3,7 @@
|
|||||||
namespace App\Services\Pacs;
|
namespace App\Services\Pacs;
|
||||||
|
|
||||||
use App\Domain\Rule\MatchMode;
|
use App\Domain\Rule\MatchMode;
|
||||||
use App\Services\StringMatcher;
|
use App\Services\ContentMatcher;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ public static function map(?string $input): array
|
|||||||
$input = strtolower($input);
|
$input = strtolower($input);
|
||||||
|
|
||||||
foreach (self::$rules as $pattern) {
|
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];
|
return [$pattern->institute_id, $pattern->facility_id];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user