Completed
Push — master ( 188bc3...1f1d6f )
by De Cramer
9s
created

onPlayerManialinkPageAnswer()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
c 0
b 0
f 0
rs 9.4285
cc 3
eloc 6
nc 2
nop 4
1
<?php
2
3
4
namespace eXpansion\Core\DataProviders;
5
6
7
class ManialinkPageAnswerDataProvider extends AbstractDataProvider
8
{
9
    /**
10
     * When a player uses an action dispatch information.
11
     *
12
     * @param $login
13
     * @param $actionId
14
     * @param array $entryValues
0 ignored issues
show
Bug introduced by
There is no parameter named $entryValues. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
15
     *
16
     */
17
    public function onPlayerManialinkPageAnswer($playerUid, $login, $actionId, array $entries)
0 ignored issues
show
Unused Code introduced by
The parameter $playerUid is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
    {
19
        $entryValues = array();
20
        if(count($entries))
21
        {
22
            foreach($entries as $entry) {
23
                $entryValues[$entry['Name']] = $entry['Value'];
24
            }
25
        }
26
27
        $this->dispatch(__METHOD__, [$login, $actionId, $entryValues]);
28
    }
29
}