ClassFinder::getClass()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Mdiyakov\DoctrineSolrBundle\Finder;
4
5
use Mdiyakov\DoctrineSolrBundle\Query\Select\ClassSelectQuery;
6
7
class ClassFinder extends AbstractFinder
8
{
9
    /**
10
     * @var ClassSelectQuery
11
     */
12
    private $selectQuery;
13
14
    /**
15
     * @var string
16
     */
17
    private $class;
18
19
    /**
20
     * @param string $class
21
     * @param ClassSelectQuery $selectQuery
22
     */
23
    public function __construct($class, ClassSelectQuery $selectQuery)
24
    {
25
        $this->selectQuery = $selectQuery;
26
        $this->class = $class;
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getClass()
33
    {
34
        return $this->class;
35
    }
36
37
    /**
38
     * @return ClassSelectQuery
39
     */
40
    protected function getQuery()
41
    {
42
        return $this->selectQuery->reset();
43
    }
44
}