RateLimit::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Stevenmaguire\Yelp\v3;
4
5
class RateLimit
6
{
7
    /**
8
     * Created at, ISO 8601 format
9
     *
10
     * @var string
11
     */
12
    public $createdAt;
13
14
    /**
15
     * Daily limit
16
     *
17
     * @var integer
18
     */
19
    public $dailyLimit;
20
21
    /**
22
     * Remaining
23
     *
24
     * @var integer
25
     */
26
    public $remaining;
27
28
    /**
29
     * Reset time
30
     *
31
     * @var string
32
     */
33
    public $resetTime;
34
35
    /**
36
     * Creates a new rate limit instance, setting the createdAt attribute.
37
     */
38 12
    public function __construct()
39
    {
40 12
        $this->createdAt = (string) date('c');
41 12
    }
42
}
43