Completed
Pull Request — master (#12)
by
unknown
11:33
created

PreFilterConditionCreationEvent   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 5
c 2
b 0
f 1
lcom 0
cbo 1
dl 0
loc 54
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getDataType() 0 4 1
A getValue() 0 4 1
A setValue() 0 4 1
A setDataType() 0 4 1
A __construct() 0 5 1
1
<?php
2
3
namespace Netdudes\DataSourceryBundle\Query\Event;
4
5
use Netdudes\DataSourceryBundle\DataType\DataTypeInterface;
6
use Symfony\Component\EventDispatcher\Event;
7
8
class PreFilterConditionCreationEvent extends Event
9
{
10
    /**
11
     * @var DataTypeInterface
12
     */
13
    private $dataType;
14
15
    /**
16
     * @var mixed
17
     */
18
    private $value;
19
20
    /**
21
     * @param mixed             $valueInDatabase
22
     * @param DataTypeInterface $dataType
23
     */
24
    public function __construct($valueInDatabase, DataTypeInterface $dataType)
25
    {
26
        $this->dataType = $dataType;
27
        $this->value = $valueInDatabase;
28
    }
29
30
    /**
31
     * @return DataTypeInterface
32
     */
33
    public function getDataType()
34
    {
35
        return $this->dataType;
36
    }
37
38
    /**
39
     * @return mixed
40
     */
41
    public function getValue()
42
    {
43
        return $this->value;
44
    }
45
46
    /**
47
     * @param mixed $value
48
     */
49
    public function setValue($value)
50
    {
51
        $this->value = $value;
52
    }
53
54
    /**
55
     * @param DataTypeInterface $dataType
56
     */
57
    public function setDataType($dataType)
58
    {
59
        $this->dataType = $dataType;
60
    }
61
}
62