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