Total Complexity | 4 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | final class StiphleRateLimiterAdapter implements RateLimiterInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var ThrottleInterface |
||
17 | */ |
||
18 | private $throttle; |
||
19 | /** |
||
20 | * @var LoggerInterface |
||
21 | */ |
||
22 | private $logger; |
||
23 | |||
24 | 1 | public function __construct(ThrottleInterface $throttle, LoggerInterface $logger = null) |
|
25 | { |
||
26 | 1 | $this->throttle = $throttle; |
|
27 | 1 | $this->logger = $logger ?: new NullLogger(); |
|
28 | 1 | } |
|
29 | |||
30 | 1 | public function throttle(RateLimit $rateLimit): void |
|
47 | ]); |
||
48 | } |
||
51 |