Snapshot::isComparable()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
rs 10
cc 2
eloc 2
nc 2
nop 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
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