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.

HttpResponse   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 14
c 1
b 0
f 0
dl 0
loc 51
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getBody() 0 3 1
A getCode() 0 3 1
A __construct() 0 4 1
1
<?php namespace CalDAVClient\Facade\Responses;
2
/**
3
 * Copyright 2017 OpenStack Foundation
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 * http://www.apache.org/licenses/LICENSE-2.0
8
 * Unless required by applicable law or agreed to in writing, software
9
 * distributed under the License is distributed on an "AS IS" BASIS,
10
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
 * See the License for the specific language governing permissions and
12
 * limitations under the License.
13
 **/
14
15
/**
16
 * Class HttpResponse
17
 * @package CalDAVClient\Facade\Responses
18
 */
19
abstract class HttpResponse
20
{
21
    const HttpOKStatus        = 'HTTP/1.1 200 OK';
22
    const HttpNotFoundStatus  = 'HTTP/1.1 404 Not Found';
23
    const HttpForbiddenStatus = 'HTTP/1.1 403 Forbidden';
24
25
    const HttpCodeCreated       = 201;
26
    const HttpCodeNoContent     = 204;
27
    const HttpCodeOk            = 200;
28
    const HttpCodeMultiResponse = 207;
29
    /**
30
     * @var string
31
     */
32
    protected $body;
33
34
    /**
35
     * @var int
36
     */
37
    protected $code;
38
39
    /**
40
     * HttpResponse constructor.
41
     * @param string $body
42
     * @param int $code
43
     */
44
    public function __construct($body, $code)
45
    {
46
        $this->body = $body;
47
        $this->code = $code;
48
    }
49
50
    /**
51
     * @return string
52
     */
53
    public function getBody()
54
    {
55
        return $this->body;
56
    }
57
58
    /**
59
     * @return int
60
     */
61
    public function getCode()
62
    {
63
        return $this->code;
64
    }
65
66
    /**
67
     * @return bool
68
     */
69
    abstract public function isSuccessFull();
70
}