SuggesterResults   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setResults() 0 3 1
A setQuery() 0 3 1
A getResults() 0 3 1
A setIndex() 0 3 1
A setLimit() 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\Container;
11
12
class SuggesterResults
13
{
14
    /** @var string */
15
    private $index;
16
17
    /** @var string */
18
    private $query;
19
20
    /** @var array<string> */
21
    private $results = [];
22
23
    /** @var float the time in seconds */
24
    private $time;
0 ignored issues
show
introduced by
The private property $time is not used, and could be removed.
Loading history...
25
26
    /** @var int */
27
    private $limit;
28
29
30
    public function setIndex(string $newIndex): void
31
    {
32
        $this->index = $newIndex;
33
    }
34
35
36
    public function setLimit(int $newLimit): void
37
    {
38
        $this->limit = $newLimit;
39
    }
40
41
42
    public function setQuery(string $newQuery): void
43
    {
44
        $this->query = $newQuery;
45
    }
46
47
48
    /** @return array<string> */
49
    public function getResults(): array
50
    {
51
        return $this->results;
52
    }
53
54
55
    /** @param array<string> $newResults */
56
    public function setResults(array $newResults): void
57
    {
58
        $this->results = $newResults;
59
    }
60
}
61