Passed
Push — master ( 4f3302...913bce )
by Matthieu
01:55
created

IPv4   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 15
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A version() 0 3 1
A maxAddress() 0 3 1
A minAddress() 0 3 1
1
<?php
2
/**
3
 * Trait IPv4 implements version 4
4
 *
5
 * @package IPTools
6
 */
7
namespace mracine\IPTools\IPV4;
8
9
use mracine\IPTools\IPVersion;;
10
11
trait IPv4
12
{
13 2
    public function version()
14
    {
15 2
        return IPVersion::IPv4; 
16
    }
17
18 1
    public static function minAddress()
19
    {
20 1
        return new Address(0);
21
    }
22
23 1
    public static function maxAddress()
24
    {
25 1
        return new Address(0xffffffff);
26
    }
27
}