Passed
Push — hans/spellchecktest ( a8ac63...c17103 )
by Simon
05:13
created

SearchResultSetTrait::setSpellcheck()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
4
namespace Firesphere\SolrSearch\Traits;
5
6
use Firesphere\SolrSearch\Results\SearchResult;
7
use SilverStripe\ORM\ArrayList;
8
use SilverStripe\View\ArrayData;
9
use Solarium\Component\Result\Highlighting\Highlighting;
10
11
/**
12
 * Trait SearchResultSetTrait
13
 * @package Firesphere\SolrSearch\Traits
14
 */
15
trait SearchResultSetTrait
16
{
17
    /**
18
     * @var int
19
     */
20
    protected $totalItems;
21
    /**
22
     * @var ArrayData
23
     */
24
    protected $facets;
25
26
    /**
27
     * @var Highlighting
28
     */
29
    protected $highlight;
30
31
    /**
32
     * @param $highlight
33
     * @return SearchResult
34
     */
35
    public function setHighlight($highlight): self
36
    {
37
        $this->highlight = $highlight;
38
39
        return $this;
40
    }
41
42
    /**
43
     * @param $count
44
     * @return self
45
     */
46
    public function setTotalItems($count): self
47
    {
48
        $this->totalItems = $count;
49
50
        return $this;
51
    }
52
}
53