update:优化代码

This commit is contained in:
JaguarJack
2021-02-27 18:31:59 +08:00
parent ddf521b62b
commit c190672603
2 changed files with 93 additions and 89 deletions

View File

@@ -19,6 +19,10 @@ class SensitiveWord implements ValidateInterface
{
$trie = app(Trie::class);
if (!$trie->getTries()) {
return true;
}
$word = $trie->getSensitiveWords($trie->getTries(), $value, false);
return !$word;