GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AdminLevel::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Geocoder package.
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license    MIT License
11
 */
12
13
namespace Geocoder\Model;
14
15
/**
16
 * @author William Durand <[email protected]>
17
 */
18
final class AdminLevel
19
{
20
    /**
21
     * @var int
22
     */
23
    private $level;
24
25
    /**
26
     * @var string
27
     */
28
    private $name;
29
30
    /**
31
     * @var string|null
32
     */
33
    private $code;
34
35
    /**
36
     * @param int         $level
37
     * @param string      $name
38
     * @param string|null $code
39
     */
40
    public function __construct(int $level, string $name, string $code = null)
41
    {
42
        $this->level = $level;
43
        $this->name = $name;
44
        $this->code = $code;
45
    }
46
47
    /**
48
     * Returns the administrative level.
49
     *
50
     * @return int Level number [1,5]
51
     */
52
    public function getLevel(): int
53
    {
54
        return $this->level;
55
    }
56
57
    /**
58
     * Returns the administrative level name.
59
     *
60
     * @return string
61
     */
62
    public function getName(): string
63
    {
64
        return $this->name;
65
    }
66
67
    /**
68
     * Returns the administrative level short name.
69
     *
70
     * @return string|null
71
     */
72
    public function getCode()
73
    {
74
        return $this->code;
75
    }
76
77
    /**
78
     * Returns a string with the administrative level name.
79
     *
80
     * @return string
81
     */
82
    public function __toString(): string
83
    {
84
        return $this->getName();
85
    }
86
}
87