Passed
Push — master ( 851c5d...3501a4 )
by Artem
01:43
created

LKEVersionRepository::jsonToEntity()   A

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\LKE\Repository;
13
14
use Linode\Entity;
15
use Linode\Internal\AbstractRepository;
16
use Linode\LKE\LKEVersion;
17
use Linode\LKE\LKEVersionRepositoryInterface;
18
19
/**
20
 * @codeCoverageIgnore This class was autogenerated.
21
 */
22
class LKEVersionRepository extends AbstractRepository implements LKEVersionRepositoryInterface
23
{
24
    protected function getBaseUri(): string
25
    {
26
        return '/lke/versions';
27
    }
28
29
    protected function getSupportedFields(): array
30
    {
31
        return [
32
            LKEVersion::FIELD_ID,
33
        ];
34
    }
35
36
    protected function jsonToEntity(array $json): Entity
37
    {
38
        return new LKEVersion($this->client, $json);
39
    }
40
}
41