Snapshot   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 5
Bugs 0 Features 2
Metric Value
wmc 6
c 5
b 0
f 2
lcom 1
cbo 1
dl 0
loc 14
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 4
A isComparable() 0 4 2
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
class Snapshot extends AbstractSnapshot
15
{
16
    public function __construct(array $args = [])
17
    {
18
        $this->raw = isset($args['raw']) ? $args['raw'] : null;
19
        $this->data = isset($args['data']) ? $args['data'] : [];
20
        $this->comparable = isset($args['comparable']) ? true === $args['comparable'] : null;
21
    }
22
23
    public function isComparable(AbstractSnapshot $s)
24
    {
25
        return null === $this->comparable ? parent::isComparable($s) : $this->comparable;
26
    }
27
}
28
29