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