VariableHistory::getValue()   A
last analyzed

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
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity
9
 * @ORM\Table(name="var_history")
10
 */
11
class VariableHistory
12
{
13
    /**
14
     * @ORM\Column(type="integer")
15
     * @ORM\Id
16
     * @ORM\GeneratedValue(strategy="AUTO")
17
     */
18
    private $id;
19
20
    /**
21
     * @return mixed
22
     */
23
    public function getVar()
24
    {
25
        return $this->var;
26
    }
27
28
    /**
29
     * @param mixed $var
30
     * @return VariableHistory
31
     */
32 3
    public function setVar($var)
33
    {
34 3
        $this->var = $var;
35 3
        return $this;
36
    }
37
38
    /**
39
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Variable", inversedBy="history")
40
     */
41
    private $var;
42
43
    /**
44
     * @ORM\Column(type="string", nullable=true)
45
     */
46
    private $value;
47
48
    /**
49
     * @ORM\Column(type="datetime", nullable=true)
50
     */
51
    private $time;
52
53
54
    /**
55
     * @return mixed
56
     */
57
    public function getId()
58
    {
59
        return $this->id;
60
    }
61
62
    /**
63
     * @param mixed $id
64
     * @return Variable
65
     */
66
    public function setId($id)
67
    {
68
        $this->id = $id;
69
        return $this;
70
    }
71
72
    /**
73
     * @return mixed
74
     */
75
    public function getValue()
76
    {
77
        return $this->value;
78
    }
79
80
    /**
81
     * @param mixed $value
82
     */
83 3
    public function setValue($value)
84
    {
85 3
        $this->value = $value;
86 3
    }
87
88
    /**
89
     * @return mixed
90
     */
91
    public function getTime()
92
    {
93
        return $this->time;
94
    }
95
96
    /**
97
     * @param mixed $time
98
     */
99 3
    public function setTime($time)
100
    {
101 3
        $this->time = $time;
102 3
    }
103
104
    public function __toString()
105
    {
106
        return $this->getValue();
107
    }
108
}
109