Passed
Push — master ( 1c967b...a5ecf6 )
by Alex
03:16
created

Subnet::getExceptKeys()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 8
nc 1
nop 0
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Axsor\PhpIPAM\Models;
4
5
use Axsor\PhpIPAM\Facades\PhpIPAM;
6
7
class Subnet extends Model
8
{
9
10
    public function update()
11
    {
12
        return PhpIPAM::subnetUpdate($this, $this->except($this->getExceptKeys()));
0 ignored issues
show
Bug introduced by
The method subnetUpdate() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

12
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetUpdate($this, $this->except($this->getExceptKeys()));
Loading history...
13
    }
14
15
    public function drop()
16
    {
17
        return PhpIPAM::subnetDrop($this);
0 ignored issues
show
Bug introduced by
The method subnetDrop() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetDrop($this);
Loading history...
18
    }
19
20
    public function usage()
21
    {
22
        return PhpIPAM::subnetUsage($this);
0 ignored issues
show
Bug introduced by
The method subnetUsage() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

22
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetUsage($this);
Loading history...
23
    }
24
25
    public function freeAddress()
26
    {
27
        return PhpIPAM::subnetFreeAddress($this);
0 ignored issues
show
Bug introduced by
The method subnetFreeAddress() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetFreeAddress($this);
Loading history...
28
    }
29
30
    public function slaves()
31
    {
32
        return PhpIPAM::subnetSlaves($this);
0 ignored issues
show
Bug introduced by
The method subnetSlaves() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

32
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetSlaves($this);
Loading history...
33
    }
34
35
    public function slavesRecursive()
36
    {
37
        return PhpIPAM::subnetSlavesRecursive($this);
0 ignored issues
show
Bug introduced by
The method subnetSlavesRecursive() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

37
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetSlavesRecursive($this);
Loading history...
38
    }
39
40
    public function addresses()
41
    {
42
        return PhpIPAM::subnetAddresses($this);
0 ignored issues
show
Bug introduced by
The method subnetAddresses() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

42
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetAddresses($this);
Loading history...
43
    }
44
45
    public function ip(string $ip)
46
    {
47
        return PhpIPAM::subnetIp($this, $ip);
0 ignored issues
show
Bug introduced by
The method subnetIp() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

47
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetIp($this, $ip);
Loading history...
48
    }
49
50
    public function freeSubnet(int $mask)
51
    {
52
        return PhpIPAM::subnetFreeSubnet($this, $mask);
0 ignored issues
show
Bug introduced by
The method subnetFreeSubnet() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

52
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetFreeSubnet($this, $mask);
Loading history...
53
    }
54
55
    public function freeSubnets(int $mask)
56
    {
57
        return PhpIPAM::subnetFreeSubnets($this, $mask);
0 ignored issues
show
Bug introduced by
The method subnetFreeSubnets() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

57
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetFreeSubnets($this, $mask);
Loading history...
58
    }
59
60
    public function resize(int $mask)
61
    {
62
        return PhpIPAM::subnetResize($this, $mask);
0 ignored issues
show
Bug introduced by
The method subnetResize() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

62
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetResize($this, $mask);
Loading history...
63
    }
64
65
    public function split($numero)
66
    {
67
        return PhpIPAM::subnetSplit($this, $numero);
0 ignored issues
show
Bug introduced by
The method subnetSplit() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

67
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetSplit($this, $numero);
Loading history...
68
    }
69
70
    public function truncate()
71
    {
72
        return PhpIPAM::subnetTruncate($this);
0 ignored issues
show
Bug introduced by
The method subnetTruncate() does not exist on Axsor\PhpIPAM\Facades\PhpIPAM. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

72
        return PhpIPAM::/** @scrutinizer ignore-call */ subnetTruncate($this);
Loading history...
73
    }
74
75
    public function getExceptKeys()
76
    {
77
        return [
78
            'id',
79
            'ip',
80
            'editDate',
81
            'lastSeen',
82
            'lastScan',
83
            'lastDiscovery',
84
            'calculation',
85
        ];
86
    }
87
}
88