Completed
Push — master ( 354bbd...8413c0 )
by John
03:53
created

NoThrottle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A shouldThrottle() 0 3 1
A logRequest() 0 3 1
1
<?php
2
namespace LunixREST\Throttle;
3
4
use LunixREST\Request\Request;
5
6
class NoThrottle implements Throttle {
7
    /**
8
     * Never throttle
9
     * @param \LunixREST\Request\Request $request
10
     * @return bool
11
     */
12
    public function shouldThrottle(Request $request): bool {
13
        return false;
14
    }
15
16
    /**
17
     * Log that a request took place
18
     * @param \LunixREST\Request\Request $request
19
     */
20
    public function logRequest(Request $request) {
21
        //Do nothing
22
    }
23
}
24