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
02:17
created

Request::getHeaders()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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("request")
11
 */
12
class Request
13
{
14
    /**
15
     * @Serializer\Type("string")
16
     * @Serializer\XmlAttribute
17
     *
18
     * @var string
19
     */
20
    private $method;
21
22
    /**
23
     * @Serializer\Type("string")
24
     * @Serializer\XmlAttribute
25
     *
26
     * @var string
27
     */
28
    private $uri;
29
30
    /**
31
     * @Serializer\XmlList(
32
     *     inline=true,
33
     *     entry="header"
34
     * )
35
     * @Serializer\Type("array<Saikootau\ApiBundle\Resource\Header>")
36
     *
37
     * @var Header[]
38
     */
39
    private $headers;
40
41 12
    public function __construct(string $method, string $uri, Header ...$headers)
42
    {
43 12
        $this->method = $method;
44 12
        $this->uri = $uri;
45 12
        $this->headers = $headers;
46 12
    }
47
48
    /**
49
     * Returns the request method.
50
     *
51
     * @return string
52
     */
53 2
    public function getMethod(): string
54
    {
55 2
        return $this->method;
56
    }
57
58
    /**
59
     * Returns the uri that was requested.
60
     *
61
     * @return string
62
     */
63 2
    public function getUri(): string
64
    {
65 2
        return $this->uri;
66
    }
67
68
    /**
69
     * Returns headers associated with this request.
70
     *
71
     * @return Header[]
72
     */
73 2
    public function getHeaders(): array
74
    {
75 2
        return $this->headers;
76
    }
77
}
78