FreezableSimpleTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 24
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A isFrozen() 0 4 1
A setFrozen() 0 6 1
1
<?php
2
3
namespace Clippings\Freezable;
4
5
/**
6
 * @author    Haralan Dobrev <[email protected]>
7
 * @copyright 2014, Clippings Ltd.
8
 * @license   http://spdx.org/licenses/BSD-3-Clause
9
 */
10
trait FreezableSimpleTrait
11
{
12
    use FreezableTrait;
13
14
    private $frozen = false;
15
16
    /**
17
     * @{inheritdoc}
18
     */
19 1
    public function isFrozen()
20
    {
21 1
        return $this->frozen;
22
    }
23
24
    /**
25
     * @{inheritdoc}
26
     */
27 1
    private function setFrozen($frozen)
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
28
    {
29 1
        $this->frozen = (bool) $frozen;
30
31 1
        return $this;
32
    }
33
}
34