RateLimit::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 3
crap 1
1
<?php namespace Stevenmaguire\Uber;
2
3
class RateLimit
4
{
5
    use GetSetTrait;
6
7
    /**
8
     * Rate limit upper limit
9
     *
10
     * @var string
11
     */
12
    private $limit;
13
14
    /**
15
     * Rate limit remaining
16
     *
17
     * @var string
18
     */
19
    private $remaining;
20
21
    /**
22
     * Rate limit reset timestamp
23
     *
24
     * @var string
25
     */
26
    private $reset;
27
28
    /**
29
     * Create new RateLimit
30
     *
31
     * @param string $limit
32
     * @param string $remaining
33
     * @param string $reset
34
     */
35 40
    public function __construct($limit, $remaining, $reset)
36
    {
37 40
        $this->limit = $limit;
38 40
        $this->remaining = $remaining;
39 40
        $this->reset = $reset;
40 40
    }
41
}
42