Completed
Push — master ( f31586...66eb65 )
by De Cramer
04:28
created

RaceRecords   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 23
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A onPlayerEndRace() 0 17 2
1
<?php
2
3
namespace eXpansion\Bundle\LocalRecords\Plugins;
4
5
use eXpansion\Framework\GameTrackmania\DataProviders\Listener\ListenerInterfaceRaceData;
6
7
/**
8
 * Class RaceRecords
9
 *
10
 * @package eXpansion\Bundle\LocalRecords\Plugins;
11
 * @author  oliver de Cramer <[email protected]>
12
 */
13
class RaceRecords extends BaseRecords implements ListenerInterfaceRaceData
14
{
15
    /**
16
     * @inheritdoc
17
     */
18 2
    public function onPlayerEndRace(
19
        $login,
20
        $time,
21
        $raceTime,
22
        $stuntsScore,
23
        $cpInRace,
24
        $curCps,
25
        $blockId,
26
        $speed,
27
        $distance
28
    )
29
    {
30 2
        $eventData = $this->recordsHandler->addRecord($login, $raceTime, $curCps);
31 2
        if ($eventData) {
32 1
            $this->dispatchEvent($eventData);
33
        }
34 2
    }
35
}
36