| Conditions | 5 |
| Paths | 5 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | 39 | protected function shouldntHandle(Exception $e) { |
|
| 30 | 39 | $dontHandle = array_merge($this->dontHandle, $this->absolutelyDontHandle); |
|
| 31 | |||
| 32 | 39 | foreach ($dontHandle as $type) { |
|
| 33 | 39 | if ($e instanceof $type) { |
|
| 34 | 39 | return true; |
|
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | 33 | $sent_at = Cache::get($this->getCacheKey($e)); |
|
| 39 | 33 | if (empty($sent_at) || $sent_at->addSeconds(config('lern.ratelimit', 1))->lte(Carbon::now())) { |
|
| 40 | 33 | return false; // The cache is empty or enough time has passed, so lets continue |
|
| 41 | } else { |
||
| 42 | 6 | return true; |
|
| 43 | } |
||
| 44 | } |
||
| 45 | |||
| 56 | } |