Completed
Push — master ( 56544d...e42d15 )
by Adam
10s
created

Filter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 25
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A addStopWordFilter() 0 17 1
1
<?php
2
3
namespace BestServedCold\LaravelZendSearch\Laravel;
4
5
use BestServedCold\LaravelZendSearch\Lucene\Filter as LuceneFilter;
6
use Illuminate\Filesystem\Filesystem;
7
8
/**
9
 * Class Filter
10
 *
11
 * @package BestServedCold\LaravelZendSearch\Laravel
12
 */
13
class Filter extends LuceneFilter
14
{
15
    /**
16
     * @param  string     $language
17
     * @param  Filesystem $filesystem
18
     * @return void
19
     */
20 21
    public static function addStopWordFilter($language = 'en', Filesystem $filesystem)
21
    {
22 21
        self::addFilter(
23 21
            'StopWords',
24 21
            $filesystem->getRequire(
25
                __DIR__.
26 21
                DIRECTORY_SEPARATOR.
27 21
                'Filter'.
28 21
                DIRECTORY_SEPARATOR.
29 21
                'StopWord'.
30 21
                DIRECTORY_SEPARATOR.
31 21
                $language.
32
                '.php'
33 21
            )
34 21
        );
35
36 21
    }
37
}
38