Skip to content

Commit 0e3259f

Browse files
committed
Use Is_offensive helper package
1 parent 43e4dd2 commit 0e3259f

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"require": {
66
"php": "^7.0",
77
"rapidwebltd/rw-file-cache": "^1.2",
8-
"snipe/banbuilder": "^2.2"
8+
"divineomega/is_offensive": "^1.0"
99
},
1010
"require-dev": {
1111
"phpunit/phpunit": "^5.7",

src/Word.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,7 @@ public function syllables()
9494

9595
public function offensive()
9696
{
97-
$censor = new CensorWords;
98-
$censor->setDictionary(['en-uk', 'en-us']);
99-
$result = $censor->censorString($this->word);
100-
return count($result['matched'])>0;
97+
return is_offensive($this->word);
10198
}
10299

103100
public function portmanteaus()

0 commit comments

Comments
 (0)