Completed
Push — master ( 0837c2...4476a6 )
by Peter
03:45
created

ObviousSpecificationQuery::getModifier()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * GpsLab component.
5
 *
6
 * @author    Peter Gribanov <[email protected]>
7
 * @copyright Copyright (c) 2011, Peter Gribanov
8
 * @license   http://opensource.org/licenses/MIT
9
 */
10
11
namespace GpsLab\Component\Query\Specification;
12
13
use Happyr\DoctrineSpecification\Result\ResultModifier;
14
use Happyr\DoctrineSpecification\Specification\Specification;
15
16
class ObviousSpecificationQuery implements SpecificationQuery
17
{
18
    /**
19
     * @var string
20
     */
21
    private $entity = '';
22
23
    /**
24
     * @var Specification
25
     */
26
    private $spec = '';
27
28
    /**
29
     * @var ResultModifier|null
30
     */
31
    private $modifier = '';
32
33
    /**
34
     * @param string              $entity
35
     * @param Specification       $spec
36
     * @param ResultModifier|null $modifier
37
     */
38
    public function __construct($entity, Specification $spec, ResultModifier $modifier = null)
39
    {
40
        $this->entity = $entity;
41
        $this->spec = $spec;
42
        $this->modifier = $modifier;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getEntity()
49
    {
50
        return $this->entity;
51
    }
52
53
    /**
54
     * @return Specification
55
     */
56
    public function getSpec()
57
    {
58
        return $this->spec;
59
    }
60
61
    /**
62
     * @return ResultModifier|null
63
     */
64
    public function getModifier()
65
    {
66
        return $this->modifier;
67
    }
68
}
69