Skip to content

Commit

Permalink
Merge pull request #3 from faissaloux/fix-line-detection
Browse files Browse the repository at this point in the history
Fix line detection
  • Loading branch information
JonPurvis authored Aug 5, 2024
2 parents bfa57d8 + 4125e33 commit 80bf372
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 @@ -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]));
})
));

0 comments on commit 80bf372

Please sign in to comment.