Conditions | 7 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 7 |
Changes | 0 |
1 | <?php |
||
30 | 21 | private function addFilters(array $filters = [], Filesystem $filesystem) |
|
31 | { |
||
32 | 21 | foreach ($filters as $filter => $switch) { |
|
33 | 21 | if ($switch !== false) { |
|
34 | 21 | if ($filter === 'StopWords' && ! is_array($switch)) { |
|
35 | 21 | Filter::addStopWordFilter($switch === true ? 'en' : $switch, $filesystem); |
|
36 | 21 | } else { |
|
37 | 21 | Filter::addFilter($filter, $switch === true ? [] : [$switch]); |
|
38 | } |
||
39 | 21 | } |
|
40 | 21 | } |
|
41 | 21 | } |
|
42 | } |
||
43 |