Passed
Push — master ( 443842...86f0b2 )
by Joshua
05:55 queued 01:59
created

RateLimitException::getResetTimestamp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SeamsCMS\Delivery\Exception;
6
7
class RateLimitException extends BaseException implements SeamsCMSException
8
{
9
    /** @var int */
10
    protected $limit;
11
12
    /** @var int */
13
    protected $resetTimestamp;
14
15
    /**
16
     * RateLimitException constructor.
17
     *
18
     * @param int $limit
19
     * @param int $resetTimestamp
20
     * @param string $msg
21
     */
22
    public function __construct(int $limit, int $resetTimestamp, string $msg)
23
    {
24
        $this->limit = $limit;
25
        $this->resetTimestamp = $resetTimestamp;
26
27
        parent::__construct($msg);
28
    }
29
30
    /**
31
     * @return int
32
     */
33
    public function getLimit(): int
34
    {
35
        return $this->limit;
36
    }
37
38
    /**
39
     * @return int
40
     */
41
    public function getResetTimestamp(): int
42
    {
43
        return $this->resetTimestamp;
44
    }
45
}
46