AbstractChange   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 3
c 2
b 0
f 1
lcom 0
cbo 0
dl 0
loc 26
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getOld() 0 4 1
A getNew() 0 4 1
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