Completed
Push — master ( 4a47c7...5ddc50 )
by John
02:05
created

NoThrottle::logRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
eloc 1
nc 1
nop 1
crap 1
1
<?php
2
namespace LunixREST\Throttle;
3
4
use LunixREST\APIRequest\APIRequest;
5
6
class NoThrottle implements Throttle
7
{
8
    /**
9
     * Never throttle
10
     * @param \LunixREST\APIRequest\APIRequest $request
11
     * @return bool
12
     */
13 3
    public function shouldThrottle(APIRequest $request): bool
14
    {
15 3
        return false;
16
    }
17
18
    /**
19
     * Log that a request took place
20
     * @param \LunixREST\APIRequest\APIRequest $request
21
     */
22 2
    public function logRequest(APIRequest $request)
23
    {
24
        //Do nothing
25 2
    }
26
}
27