Passed
Push — master ( 52dac5...27e93f )
by BENOIT
02:09
created

DefaultPropertyChangeset   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getType() 0 3 1
1
<?php
2
3
namespace BenTools\DoctrineWatcher\Changeset;
4
5
final class DefaultPropertyChangeset extends PropertyChangeset
6
{
7
8
    /**
9
     * DefaultChangeset constructor.
10
     * @param object $entity
11
     * @param string $property
12
     * @param null   $oldValue
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $oldValue is correct as it would always require null to be passed?
Loading history...
13
     * @param null   $newValue
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $newValue is correct as it would always require null to be passed?
Loading history...
14
     */
15
    public function __construct($entity, string $property, $oldValue = null, $newValue = null)
16
    {
17
        parent::__construct($entity, $property);
18
        $this->oldValue = $oldValue;
19
        $this->newValue = $newValue;
20
    }
21
    /**
22
     * @return string
23
     */
24
    public function getType(): string
25
    {
26
        return self::CHANGESET_DEFAULT;
27
    }
28
}
29