Suggester   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A setIndex() 0 3 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
    protected $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