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:02 queued 27s
created

Request   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 64
ccs 11
cts 11
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getHeaders() 0 3 1
A getMethod() 0 3 1
A getUri() 0 3 1
A __construct() 0 5 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("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 11
    public function __construct(string $method, string $uri, Header ...$headers)
42
    {
43 11
        $this->method = $method;
44 11
        $this->uri = $uri;
45 11
        $this->headers = $headers;
46 11
    }
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