GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

EditedEntity   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 79
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 79
c 0
b 0
f 0
wmc 6
lcom 1
cbo 0
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getOriginValue() 0 4 1
A getNewValue() 0 4 1
A getProperty() 0 4 1
A getChangeSet() 0 4 1
A isFor() 0 4 1
1
<?php
2
3
namespace Isolate\UnitOfWork\Entity\Value\Change;
4
5
use Isolate\UnitOfWork\Entity\Definition\Property;
6
use Isolate\UnitOfWork\Entity\Value\Change;
7
use Isolate\UnitOfWork\Entity\Value\ChangeSet;
8
9
final class EditedEntity implements Change
10
{
11
    /**
12
     * @var mixed
13
     */
14
    private $originValue;
15
16
    /**
17
     * @var mixed
18
     */
19
    private $newValue;
20
21
    /**
22
     * @var Property
23
     */
24
    private $property;
25
26
    /**
27
     * @var ChangeSet
28
     */
29
    private $changeSet;
30
31
    /**
32
     * @param Property $property
33
     * @param ChangeSet $changeSet
34
     * @param $originValue
35
     * @param $newValue
36
     */
37
    public function __construct(Property $property, ChangeSet $changeSet, $originValue, $newValue)
38
    {
39
        $this->property = $property;
40
        $this->originValue = $originValue;
41
        $this->newValue = $newValue;
42
        $this->changeSet = $changeSet;
43
    }
44
45
    /**
46
     * @return mixed
47
     */
48
    public function getOriginValue()
49
    {
50
        return $this->originValue;
51
    }
52
53
    /**
54
     * @return mixed
55
     */
56
    public function getNewValue()
57
    {
58
        return $this->newValue;
59
    }
60
61
    /**
62
     * @return Property
63
     */
64
    public function getProperty()
65
    {
66
        return $this->property;
67
    }
68
69
    /**
70
     * @return ChangeSet
71
     * 
72
     * @api
73
     */
74
    public function getChangeSet()
75
    {
76
        return $this->changeSet;
77
    }
78
79
    /**
80
     * @param $propertyName
81
     * @return bool
82
     */
83
    public function isFor($propertyName)
84
    {
85
        return $this->property->getName() === $propertyName;
86
    }
87
}
88