Change   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 11
c 2
b 0
f 0
dl 0
loc 49
ccs 13
cts 13
cp 1
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getNewValue() 0 3 1
A getOldValue() 0 3 1
A getPropertyName() 0 3 1
A __construct() 0 5 1
A setNewValue() 0 3 1
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