Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
64 | private function checkRateLimit() |
||
65 | { |
||
66 | if ($this->httpCode == self::RATE_LIMIT) { |
||
67 | $timeout = 60; |
||
68 | if (isset($this->getHeaders()['Retry-After'])) { |
||
69 | $timeout = $this->getHeaders()['Retry-After']; |
||
70 | } |
||
71 | $rateLimit = new RateLimit(); |
||
72 | $rateLimit->setTimeout($timeout); |
||
73 | |||
74 | throw $rateLimit; |
||
75 | } |
||
78 |