Completed
Push — master ( d83f32...d4821e )
by Rémi
04:29
created

UnlimitedApiRate   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 33.33%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getLimit() 0 4 1
A canMakeAnotherCall() 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
    public function getLimit()
11
    {
12
        return -1;
13
    }
14
15
    /**
16
     * @return bool
17
     */
18 12
    public function canMakeAnotherCall()
19
    {
20 12
        return true;
21
    }
22
23
    /**
24
     * @return \DateTimeInterface
25
     */
26
    public function nextWindow()
27
    {
28
        return new \DateTimeImmutable('now', new \DateTimeZone(\DateTimeZone::UTC));
29
    }
30
}
31