Skip to content

Commit

Permalink
improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
JonPurvis committed Oct 18, 2024
1 parent 4b6b67b commit 7eb511a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Expectations/Profanity.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 7eb511a

Please sign in to comment.