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.
Completed
Pull Request — master (#1)
by Pascal
03:33
created

Header   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 42
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getValue() 0 3 1
A getName() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Saikootau\ApiBundle\Resource;
6
7
use JMS\Serializer\Annotation as Serializer;
8
9
/**
10
 * @Serializer\XmlRoot("header")
11
 */
12
class Header
13
{
14
    /**
15
     * @Serializer\XmlAttribute
16
     * @Serializer\Type("string")
17
     *
18
     * @var string
19
     */
20
    private $name;
21
22
    /**
23
     * @Serializer\Type("string")
24
     * @Serializer\XmlValue
25
     *
26
     * @var string
27
     */
28
    private $value;
29
30 11
    public function __construct(string $name, string $value)
31
    {
32 11
        $this->name = $name;
33 11
        $this->value = $value;
34 11
    }
35
36
    /**
37
     * Returns the name of the header.
38
     *
39
     * @return string
40
     */
41 2
    public function getName(): string
42
    {
43 2
        return $this->name;
44
    }
45
46
    /**
47
     * Returns the value of the header.
48
     *
49
     * @return string
50
     */
51 2
    public function getValue(): string
52
    {
53 2
        return $this->value;
54
    }
55
}
56