IP6   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 10
ccs 2
cts 2
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A toNumber() 0 3 1
1
<?php
2
3
namespace kalanis\kw_bans\Bans;
4
5
6
use kalanis\kw_bans\Interfaces\IIpTypes;
7
8
9
class IP6 extends AIP
10
{
11
    protected int $type = IIpTypes::TYPE_IP_6;
12
    protected int $blocks = 8;
13
    protected string $delimiter = ':';
14
    protected int $bitsInBlock = 16;
15
16 2
    protected function toNumber(string $value): int
17
    {
18 2
        return intval(hexdec($value));
19
    }
20
}
21