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 (#9)
by Cees-Jan
02:12
created

RateLimitState   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 65
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getLimit() 0 4 1
A setLimit() 0 4 1
A getRemaining() 0 4 1
A setRemaining() 0 4 1
A getReset() 0 4 1
A setReset() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Github;
4
5
use ApiClients\Client\Github\Middleware\RateLimitStatusMiddleware;
6
use ApiClients\Foundation\Hydrator\Options as HydratorOptions;
7
use ApiClients\Foundation\Options as FoundationOptions;
8
use ApiClients\Foundation\Transport\Middleware\JsonDecodeMiddleware;
9
use ApiClients\Foundation\Transport\Middleware\JsonEncodeMiddleware;
10
use ApiClients\Foundation\Transport\Options as TransportOptions;
11
use ApiClients\Middleware\HttpExceptions\HttpExceptionsMiddleware;
12
use ApiClients\Middleware\UserAgent\Options as UserAgentMiddlewareOptions;
13
use ApiClients\Middleware\UserAgent\UserAgentMiddleware;
14
use ApiClients\Middleware\UserAgent\UserAgentStrategies;
15
use function ApiClients\Foundation\options_merge;
16
17
final class RateLimitState
18
{
19
    /**
20
     * @var int
21
     */
22
    private $limit = 0;
23
24
    /**
25
     * @var int
26
     */
27
    private $remaining = 0;
28
29
    /**
30
     * @var int
31
     */
32
    private $reset = 0;
33
34
    /**
35
     * @return int
36
     */
37 1
    public function getLimit(): int
38
    {
39 1
        return $this->limit;
40
    }
41
42
    /**
43
     * @param int $limit
44
     */
45 1
    public function setLimit(int $limit)
46
    {
47 1
        $this->limit = $limit;
48 1
    }
49
50
    /**
51
     * @return int
52
     */
53 1
    public function getRemaining(): int
54
    {
55 1
        return $this->remaining;
56
    }
57
58
    /**
59
     * @param int $remaining
60
     */
61 1
    public function setRemaining(int $remaining)
62
    {
63 1
        $this->remaining = $remaining;
64 1
    }
65
66
    /**
67
     * @return int
68
     */
69 1
    public function getReset(): int
70
    {
71 1
        return $this->reset;
72
    }
73
74
    /**
75
     * @param int $reset
76
     */
77 1
    public function setReset(int $reset)
78
    {
79 1
        $this->reset = $reset;
80 1
    }
81
}
82