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

SuggesterResults   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setResults() 0 3 1
A setPageSize() 0 3 1
A setQuery() 0 3 1
A setIndex() 0 3 1
A setTime() 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
    private $query;
18
19
20
    private $results;
21
22
23
    /** @var float the time in seconds */
24
    private $time;
25
26
27
    public function setIndex(string $newIndex): void
28
    {
29
        $this->index = $newIndex;
30
    }
31
32
33
    public function setPageSize($newPage)
34
    {
35
        $this->page = $newPage;
0 ignored issues
show
Bug Best Practice introduced by
The property page does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
36
    }
37
38
    public function setQuery($newQuery)
39
    {
40
        $this->query = $newQuery;
41
    }
42
43
44
    public function setResults($newResults)
45
    {
46
        $this->results = $newResults;
47
    }
48
49
50
    public function setTime($newTime)
51
    {
52
        $this->time = $newTime;
53
    }
54
}
55