Completed
Pull Request — master (#168)
by De Cramer
08:32
created

MethodGetNumberLapsDataProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A registerPlugin() 0 6 1
A request() 0 4 1
1
<?php
2
3
namespace eXpansion\Framework\GameTrackmania\DataProviders\ScriptTimeAttack;
4
5
use eXpansion\Framework\Core\DataProviders\AbstractDataProvider;
6
use eXpansion\Framework\Core\DataProviders\MethodScriptDataProviderInterface;
7
8
/**
9
 * Class MethodGetNumberLapsDataProvider
10
 *
11
 * @author    de Cramer Oliver<[email protected]>
12
 * @copyright 2017 eXpansion
13
 * @package eXpansion\Framework\GameTrackmania\DataProviders
14
 */
15
class MethodGetNumberLapsDataProvider extends AbstractDataProvider implements MethodScriptDataProviderInterface
16
{
17
    /**
18
     * @inheritdoc
19
     *
20
     * @param string $pluginId
21
     * @param mixed $pluginService
22
     */
23
    public function registerPlugin($pluginId, $pluginService)
24
    {
25
        parent::registerPlugin($pluginId, $pluginService);
26
27
        $pluginService->setCurrentDataProvider($this);
28
    }
29
30
    /**
31
     * Request call to fetch something..
32
     *
33
     * @return void
34
     */
35
    public function request()
36
    {
37
        $this->dispatch('set', [1]);
38
    }
39
}