Completed
Push — master ( 712c83...97ed41 )
by Rémi
04:22
created

UnlimitedApiRate   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A canMakeAnotherCall() 0 4 1
A getLimit() 0 4 1
A nextWindow() 0 4 1
1
<?php
2
3
namespace Twitter\API\REST\Response;
4
5
class UnlimitedApiRate implements ApiRate
6
{
7
    /**
8
     * @return int
9
     */
10 3
    public function getLimit()
11
    {
12 3
        return -1;
13
    }
14
15
    /**
16
     * @return bool
17
     */
18 15
    public function canMakeAnotherCall()
19
    {
20 15
        return true;
21
    }
22
23
    /**
24
     * @return \DateTimeInterface
25
     */
26 3
    public function nextWindow()
27
    {
28 3
        return new \DateTimeImmutable('now', new \DateTimeZone('UTC'));
29
    }
30
}
31