diff --git a/src/Expectations/Profanity.php b/src/Expectations/Profanity.php index c982996..2f6d4f2 100644 --- a/src/Expectations/Profanity.php +++ b/src/Expectations/Profanity.php @@ -46,7 +46,7 @@ function (ObjectDescription $object) use (&$foundWords, $excluding, $including, $fileContents = str_replace($toleratedWord, '', strtolower($fileContents)); } - $foundWords = array_filter($words, fn ($word): bool => preg_match('/\b'.preg_quote($word, '/').'\b/i', $fileContents) === 1); + $foundWords = array_filter($words, fn ($word): bool => preg_match('/\b'.preg_quote($word, '/').'/i', $fileContents) === 1); //dd($foundWords);