Change::getOldValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\SkeletonMapper\UnitOfWork;
6
7
class Change
8
{
9
    /** @var string */
10
    private $propertyName;
11
12
    /** @var mixed */
13
    private $oldValue;
14
15
    /** @var mixed */
16
    private $newValue;
17
18
    /**
19
     * @param mixed $oldValue
20
     * @param mixed $newValue
21
     */
22 18
    public function __construct(string $propertyName, $oldValue, $newValue)
23
    {
24 18
        $this->propertyName = $propertyName;
25 18
        $this->oldValue     = $oldValue;
26 18
        $this->newValue     = $newValue;
27 18
    }
28
29 14
    public function getPropertyName() : string
30
    {
31 14
        return $this->propertyName;
32
    }
33
34
    /**
35
     * @return mixed
36
     */
37 2
    public function getOldValue()
38
    {
39 2
        return $this->oldValue;
40
    }
41
42
    /**
43
     * @return mixed
44
     */
45 12
    public function getNewValue()
46
    {
47 12
        return $this->newValue;
48
    }
49
50
    /**
51
     * @param mixed $newValue
52
     */
53 2
    public function setNewValue($newValue) : void
54
    {
55 2
        $this->newValue = $newValue;
56 2
    }
57
}
58