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

NullCG::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 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