Completed
Pull Request — master (#12)
by Adam
05:00 queued 01:43
created

Filter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 25
ccs 0
cts 13
cp 0
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
    public static function addStopWordFilter($language = 'en', Filesystem $filesystem)
21
    {
22
        self::addFilter(
23
            'StopWords',
24
            $filesystem->getRequire(
25
                __DIR__.
26
                DIRECTORY_SEPARATOR.
27
                'Filter'.
28
                DIRECTORY_SEPARATOR.
29
                'StopWord'.
30
                DIRECTORY_SEPARATOR.
31
                $language.
32
                '.php'
33
            )
34
        );
35
36
    }
37
}
38