Passed
Pull Request — master (#4)
by Gordon
08:08
created

Suggester::setIndex()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php declare(strict_types = 1);
2
3
/**
4
 * Created by PhpStorm.
5
 * User: gordon
6
 * Date: 24/3/2561
7
 * Time: 20:36 น.
8
 */
9
10
namespace Suilven\FreeTextSearch\Base;
11
12
use Suilven\FreeTextSearch\Container\SuggesterResults;
13
14
abstract class Suggester implements \Suilven\FreeTextSearch\Interfaces\Suggester
15
{
16
    /** @var string */
17
    private $index;
18
19
    abstract public function suggest(string $q, int $limit = 5): SuggesterResults;
20
21
22
    public function setIndex(string $newIndex): void
23
    {
24
        $this->index = $newIndex;
25
    }
26
}
27