diff --git a/src/Expectations/Profanity.php b/src/Expectations/Profanity.php index f69e9c5..8018bea 100644 --- a/src/Expectations/Profanity.php +++ b/src/Expectations/Profanity.php @@ -22,6 +22,6 @@ function (ObjectDescription $object) use (&$foundWords, $excluding): bool { }, 'to not use profanity', FileLineFinder::where(function (string $line) use (&$foundWords): bool { - return str_contains($line, (string) array_values($foundWords ?? [])[0]); + return str_contains(strtolower($line), strtolower(array_values($foundWords ?? [])[0])); }) ));