Completed
Pull Request — master (#210)
by
unknown
03:50
created

PlayerExtraDataProvider::onShotDeny()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
ccs 0
cts 4
cp 0
rs 9.4285
cc 1
eloc 3
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 PlayerExtraDataProvider extends AbstractDataProvider
13
{
14
15
    /**
16
     * @param $params
17
     */
18 View Code Duplication
    public function onNearMiss($params)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
    {
20
        $this->dispatch(__FUNCTION__,
21
            [
22
                $params['shooter'],
23
                $params['victim'],
24
                $params['weapon'],
25
                $params['distance'],
26
                (object)$params['shooterposition'],
27
                (object)$params['victimposition'],
28
            ]);
29
    }
30
31
    /**
32
     * @param $params
33
     */
34
    public function onShotDeny($params)
35
    {
36
        $this->dispatch(__FUNCTION__,
37
            [$params['shooter'], $params['victim'], $params['shooterweapon'], $params['victimweapon']]);
38
    }
39
40
41
    /**
42
     * @param $params
43
     */
44
    public function onFallDamage($params)
45
    {
46
        $this->dispatch(__FUNCTION__, [$params['login']]);
47
    }
48
49
    /**
50
     * @param $params
51
     */
52
    public function onRequestRespawn($params) {
53
        $this->dispatch(__FUNCTION__, [$params['login']]);
54
    }
55
56
57
}
58