Passed
Push — develop ( c67e1d...954e7b )
by BENARD
04:26
created

UpdateTeamRankSubscriber::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 7
rs 10
cc 1
nc 1
nop 1
1
<?php
2
namespace VideoGamesRecords\CoreBundle\EventSubscriber\Ranking;
3
4
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
5
use Symfony\Contracts\EventDispatcher\Event;
6
use VideoGamesRecords\CoreBundle\Contracts\Ranking\RankUpdateInterface;
7
use VideoGamesRecords\CoreBundle\VideoGamesRecordsCoreEvents;
8
9
final class UpdateTeamRankSubscriber implements EventSubscriberInterface
10
{
11
    private RankUpdateInterface $rankUpdateHandler;
12
13
    public function __construct(RankUpdateInterface $rankUpdateHandler)
14
    {
15
        $this->rankUpdateHandler = $rankUpdateHandler;
16
    }
17
18
    public static function getSubscribedEvents(): array
19
    {
20
        return [
21
            VideoGamesRecordsCoreEvents::SCORES_TEAM_MAJ_COMPLETED => 'process',
22
        ];
23
    }
24
25
    /**
26
     * @param Event $event
27
     */
28
    public function process(Event $event): void
0 ignored issues
show
Unused Code introduced by
The parameter $event is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

28
    public function process(/** @scrutinizer ignore-unused */ Event $event): void

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
29
    {
30
        $this->rankUpdateHandler->majRankPointChart();
31
        $this->rankUpdateHandler->majRankPointGame();
32
        $this->rankUpdateHandler->majRankCup();
33
        $this->rankUpdateHandler->majRankMedal();
34
        $this->rankUpdateHandler->majRankBadge();
35
    }
36
}
37