Passed
Push — master ( f76f45...88719b )
by Mattia
04:38
created

AccountCreatedListener::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Listeners\Account;
6
7
use App\Events\Account\AccountCreatedEvent;
8
use App\Models\AccountStats;
9
10
class AccountCreatedListener
11
{
12
    /**
13
     * @param AccountCreatedEvent $event
14
     */
15
    public function handle(AccountCreatedEvent $event): void
16
    {
17
        AccountStats::create([
18
            'uuid' => $event->getAccount()->uuid,
19
            'count_request' => 0,
20
            'request_at' => null,
21
        ]);
22
    }
23
}
24