Completed
Pull Request — master (#191)
by De Cramer
38:49 queued 31:55
created

LapsRecords   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

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