IPv6PoolRepository   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 8
c 0
b 0
f 0
dl 0
loc 20
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getBaseUri() 0 3 1
A jsonToEntity() 0 3 1
A getSupportedFields() 0 7 1
1
<?php
2
3
// ---------------------------------------------------------------------
4
//
5
//  Copyright (C) 2018-2024 Artem Rodygin
6
//
7
//  You should have received a copy of the MIT License along with
8
//  this file. If not, see <https://opensource.org/licenses/MIT>.
9
//
10
// ---------------------------------------------------------------------
11
12
namespace Linode\Networking\Repository;
13
14
use Linode\Entity;
15
use Linode\Internal\AbstractRepository;
16
use Linode\Networking\IPv6Pool;
17
use Linode\Networking\IPv6PoolRepositoryInterface;
18
19
/**
20
 * @codeCoverageIgnore This class was autogenerated.
21
 */
22
class IPv6PoolRepository extends AbstractRepository implements IPv6PoolRepositoryInterface
23
{
24
    protected function getBaseUri(): string
25
    {
26
        return '/networking/ipv6/pools';
27
    }
28
29
    protected function getSupportedFields(): array
30
    {
31
        return [
32
            IPv6Pool::FIELD_RANGE,
33
            IPv6Pool::FIELD_PREFIX,
34
            IPv6Pool::FIELD_REGION,
35
            IPv6Pool::FIELD_ROUTE_TARGET,
36
        ];
37
    }
38
39
    protected function jsonToEntity(array $json): Entity
40
    {
41
        return new IPv6Pool($this->client, $json);
42
    }
43
}
44