AbstractChange::getNew()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * This file is part of the Totem package
4
 *
5
 * For the full copyright and license information, please view the LICENSE file
6
 * that was distributed with this source code.
7
 *
8
 * @copyright Baptiste Clavié <[email protected]>
9
 * @license   http://www.opensource.org/licenses/MIT-License MIT License
10
 */
11
12
namespace Totem;
13
14
/**
15
 * Base class for a Change
16
 *
17
 * @author Baptiste Clavié <[email protected]>
18
 * @author Rémy Gazelot <[email protected]>
19
 */
20
abstract class AbstractChange implements ChangeInterface
21
{
22
    /** old state */
23
    private $old;
24
25
    /** new state */
26
    private $new;
27
28
    public function __construct($old, $new)
29
    {
30
        $this->old = $old;
31
        $this->new = $new;
32
    }
33
34
    /** {@inheritDoc} */
35
    public function getOld()
36
    {
37
        return $this->old;
38
    }
39
40
    /** {@inheritDoc} */
41
    public function getNew()
42
    {
43
        return $this->new;
44
    }
45
}
46
47