Passed
Push — hans/state-improvements ( 23b626...a8d3b7 )
by Simon
06:38
created

GetSetSearchResolverTrait::getFound()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Firesphere\SolrSearch\Traits;
5
6
use Firesphere\SolrSearch\Indexes\BaseIndex;
7
8
/**
9
 * Setters and getters for the introspection.
10
 *
11
 * Setters and getters to help with introspection/resolving, it's fairly simple, but extracted
12
 * so it's cleaner to read the code
13
 *
14
 * @package Firesphere\SolrSearch\Traits
15
 */
16
trait GetSetSearchResolverTrait
17
{
18
    /**
19
     * @var BaseIndex Index to use
20
     */
21
    protected $index;
22
23
    /**
24
     * Get the current index
25
     *
26
     * @return BaseIndex
27
     */
28 1
    public function getIndex(): BaseIndex
29
    {
30 1
        return $this->index;
31
    }
32
33
    /**
34
     * Set the current index
35
     *
36
     * @param mixed $index
37
     * @return $this
38
     */
39 74
    public function setIndex($index)
40
    {
41 74
        $this->index = $index;
42
43 74
        return $this;
44
    }
45
}
46