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.

Country   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 37
wmc 2
lcom 1
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A jsonSerialize() 0 7 1
1
<?php
2
3
namespace Cromwell\ISO3166;
4
5
class Country implements \JsonSerializable
6
{
7
8
    /** @var string */
9
    public $code;
10
11
    /** @var string */
12
    public $name;
13
14
    /**
15
     * Country constructor.
16
     *
17
     * @param string $code
18
     * @param string $name
19
     */
20
    public function __construct($code, $name)
21
    {
22
        $this->code = $code;
23
        $this->name = $name;
24
    }
25
26
    /**
27
     * (PHP 5 &gt;= 5.4.0)<br/>
28
     * Specify data which should be serialized to JSON
29
     * @link http://php.net/manual/en/jsonserializable.jsonserialize.php
30
     * @return mixed data which can be serialized by <b>json_encode</b>,
31
     * which is a value of any type other than a resource.
32
     */
33
    public function jsonSerialize()
34
    {
35
        return [
36
            'code' => $this->code,
37
            'name' => $this->name,
38
        ];
39
    }
40
41
}
42