Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
25 | 3 | public function limitSilently(string $identifier, Rate $rate): Status |
|
26 | { |
||
27 | 3 | $key = $this->key($identifier, $rate->getInterval()); |
|
28 | |||
29 | 3 | $current = $this->hit($key, $rate); |
|
30 | |||
31 | 3 | return Status::from( |
|
32 | 3 | $identifier, |
|
33 | 3 | $current, |
|
34 | 3 | $rate->getOperations(), |
|
35 | 3 | $this->store[$key]['reset_time'] |
|
36 | ); |
||
37 | } |
||
38 | |||
58 |