ClassFinder   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 36
c 0
b 0
f 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getQuery() 0 3 1
A getClass() 0 3 1
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
}