WarmUpCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 19
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 4 1
1
<?php
2
3
namespace Bavix\WalletVacuum\Commands;
4
5
use Bavix\Wallet\Models\Wallet;
6
use Illuminate\Console\Command;
7
8
class WarmUpCommand extends Command
9
{
10
    /**
11
     * @var string
12
     */
13
    protected $name = 'wallet:warm-up';
14
15
    /**
16
     * @var string
17
     */
18
    protected $description = 'Needed to quickly warm up the cache';
19
20
    /**
21
     * @return void
22
     */
23 1
    public function handle(): void
24
    {
25 1
        Wallet::query()->each(static function (Wallet $wallet) {
26 1
            return $wallet->refreshBalance();
27 1
        });
28 1
    }
29
}
30