Completed
Push — master ( c488c9...57d03a )
by WEBEWEB
01:19
created

RateLimitTrait::getReset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the pexels-library package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Library\Pexels\Model;
13
14
use DateTime;
15
16
/**
17
 * Rate limit trait.
18
 *
19
 * @author webeweb <https://github.com/webeweb/>
20
 * @package WBW\Library\Pexels\Model
21
 */
22
trait RateLimitTrait {
23
24
    /**
25
     * Limit.
26
     *
27
     * @var int
28
     */
29
    private $limit;
30
31
    /**
32
     * Remaining.
33
     *
34
     * @var int
35
     */
36
    private $remaining;
37
38
    /**
39
     * Reset.
40
     *
41
     * @var DateTime
42
     */
43
    private $reset;
44
45
    /**
46
     * Get the limit.
47
     *
48
     * @return int Returns the limit.
49
     */
50
    public function getLimit() {
51
        return $this->limit;
52
    }
53
54
    /**
55
     * Get the remaining.
56
     *
57
     * @return int Returns the remaining.
58
     */
59
    public function getRemaining() {
60
        return $this->remaining;
61
    }
62
63
    /**
64
     * Get the reset.
65
     *
66
     * @return DateTime Returns reset.
67
     */
68
    public function getReset() {
69
        return $this->reset;
70
    }
71
72
    /**
73
     * Set the limit.
74
     *
75
     * @param int $limit The limit.
76
     */
77
    public function setLimit($limit) {
78
        $this->limit = $limit;
79
        return $this;
80
    }
81
82
    /**
83
     * Set the remaining.
84
     *
85
     * @param int $remaining The remaining.
86
     */
87
    public function setRemaining($remaining) {
88
        $this->remaining = $remaining;
89
        return $this;
90
    }
91
92
    /**
93
     * Set the reset.
94
     *
95
     * @param DateTime|null $reset The reset.
96
     */
97
    public function setReset(DateTime $reset = null) {
98
        $this->reset = $reset;
99
        return $this;
100
    }
101
}
102