Total Complexity | 4 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class StopWords |
||
10 | { |
||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $stopWords = []; |
||
15 | |||
16 | public function __construct(array $stopWords) |
||
17 | { |
||
18 | $this->stopWords = array_fill_keys($stopWords, true); |
||
19 | } |
||
20 | |||
21 | public function isStopWord(string $token): bool |
||
24 | } |
||
25 | |||
26 | public static function factory(string $language = 'English'): self |
||
35 | } |
||
36 | } |
||
37 |