VlansRepository::jsonToEntity()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 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\Vlans;
17
use Linode\Networking\VlansRepositoryInterface;
18
19
/**
20
 * @codeCoverageIgnore This class was autogenerated.
21
 */
22
class VlansRepository extends AbstractRepository implements VlansRepositoryInterface
23
{
24
    protected function getBaseUri(): string
25
    {
26
        return '/networking/vlans';
27
    }
28
29
    protected function getSupportedFields(): array
30
    {
31
        return [
32
            Vlans::FIELD_REGION,
33
            Vlans::FIELD_LABEL,
34
            Vlans::FIELD_LINODES,
35
            Vlans::FIELD_CREATED,
36
        ];
37
    }
38
39
    protected function jsonToEntity(array $json): Entity
40
    {
41
        return new Vlans($this->client, $json);
42
    }
43
}
44