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

DefaultPropertyChangeset::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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