Passed
Pull Request — develop (#97)
by BENARD
12:42
created

UpdatePlayerBadgeHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 3
c 1
b 0
f 0
dl 0
loc 15
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 3 1
A __construct() 0 2 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VideoGamesRecords\CoreBundle\Scheduler\Handler;
6
7
use Doctrine\DBAL\Exception;
8
use VideoGamesRecords\CoreBundle\Handler\Badge\PlayerBadgeHandler;
9
use VideoGamesRecords\CoreBundle\Scheduler\Message\UpdatePlayerChartRanking;
10
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
11
12
#[AsMessageHandler]
13
class UpdatePlayerBadgeHandler
14
{
15
    public function __construct(private readonly PlayerBadgeHandler $handler)
16
    {
17
    }
18
19
    /**
20
     * @param UpdatePlayerChartRanking $message
21
     * @return void
22
     * @throws Exception
23
     */
24
    public function __invoke(UpdatePlayerChartRanking $message): void
25
    {
26
        $this->handler->handle();
27
    }
28
}
29