Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 6 | public function handle() |
|
29 | { |
||
30 | 6 | if (config('geld.history_mode')) { |
|
31 | 6 | $retention = '@'.strtotime('-'.config('geld.retention')); |
|
32 | 6 | $edge = new DateTime($retention); |
|
33 | 6 | CurrencyHistory::where('created_at', '<', $edge) |
|
34 | 6 | ->delete(); |
|
35 | |||
36 | 6 | Log::info("History records soft deleted successfully"); |
|
37 | } |
||
40 |