Completed
Push — master ( ec8e0b...6dedb2 )
by Vitaly
02:07
created

NullCG   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
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 19
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A compareLength() 0 5 1
1
<?php declare(strict_types=1);
2
/**
3
 * Created by Vitaly Iegorov <[email protected]>.
4
 * on 07.04.17 at 07:43
5
 */
6
namespace samsonframework\stringconditiontree\string;
7
8
/**
9
 * Null character group with lowest priority.
10
 *
11
 * @author Vitaly Egorov <[email protected]>
12
 */
13
class NullCG extends AbstractCG
14
{
15
    /**
16
     * NullCG constructor.
17
     */
18 16
    public function __construct()
19
    {
20 16
        parent::__construct('', 0);
21 16
    }
22
23
    /**
24
     * @inheritdoc
25
     */
26
    protected function compareLength(AbstractCG $group): int
27
    {
28
        // Passed character group always has higher priority
29
        return -1;
30
    }
31
}
32