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.

AuthorizationResponse   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 31
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A isAuthorized() 0 4 1
1
<?php
2
3
namespace JumpCloud\Response;
4
5
use GuzzleHttp\Psr7\Response as HttpResponse;
6
7
/**
8
 * Class AuthorizationResponse
9
 * @package JumpCloud\Response
10
 */
11
class AuthorizationResponse implements ResponseInterface
12
{
13
    use ResponseTrait;
14
15
    const AUTHORISED = true;
16
    const UNAUTHORISED = false;
17
18
    /**
19
     * @var bool
20
     */
21
    private $authorized;
22
23
    /**
24
     * AuthorizationResponse constructor.
25
     * @param HttpResponse $response
26
     * @param $authorized
27
     */
28 12
    public function __construct(HttpResponse $response, $authorized)
29
    {
30 12
        $this->response = $response;
31 12
        $this->authorized = $authorized;
32 12
    }
33
34
    /**
35
     * @return bool
36
     */
37 12
    public function isAuthorized()
38
    {
39 12
        return $this->authorized;
40
    }
41
}
42