PlayerActionDataProvider::onActionCustomEvent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 10
cp 0
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace eXpansion\Framework\GameShootmania\DataProviders;
4
5
use eXpansion\Framework\Core\DataProviders\AbstractDataProvider;
6
7
/**
8
 * Class PlayerDataProvider provides information to plugins about what is going on with players.
9
 *
10
 * @package eXpansion\Framework\Core\DataProviders
11
 */
12
class PlayerActionDataProvider extends AbstractDataProvider
13
{
14
15
    /**
16
     * @param $params
17
     * @return void
18
     */
19
    public function onActionCustomEvent($params)
20
    {
21
        $this->dispatch(__FUNCTION__, [
22
            $params['shooter'],
23
            $params['victim'],
24
            $params['actionId'],
25
            $params['param1'],
26
            $params['param2'],
27
        ]);
28
    }
29
30
31
    /**
32
     * @param $params
33
     * @return void
34
     */
35
    public function onActionEvent($params)
36
    {
37
        $this->dispatch(__FUNCTION__, [
38
            $params['login'],
39
            $params['actioninput'],
40
        ]);
41
    }
42
43
44
    /**
45
     *
46
     * @param $params
47
     */
48
    public function onPlayerRequestActionChange($params)
49
    {
50
        $this->dispatch(__FUNCTION__, [
51
            $params['login'],
52
            $params['actionchange'],
53
        ]);
54
    }
55
56
}
57