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

NoThrottle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 21
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A shouldThrottle() 0 4 1
A logRequest() 0 4 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