Completed
Pull Request — master (#148)
by De Cramer
02:37
created

onPlayerManialinkPageAnswer()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 3

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 12
ccs 7
cts 7
cp 1
rs 9.4285
cc 3
eloc 6
nc 2
nop 4
crap 3
1
<?php
2
3
4
namespace eXpansion\Framework\GameManiaplanet\DataProviders;
5
6
use eXpansion\Framework\Core\DataProviders\AbstractDataProvider;
7
8
class ManialinkPageAnswerDataProvider extends AbstractDataProvider
9
{
10
    /**
11
     * When a player uses an action dispatch information.
12
     *
13
     * @param $login
14
     * @param $actionId
15
     *
16
     */
17 1
    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 1
        $entryValues = array();
20 1
        if (count($entries))
21
        {
22 1
            foreach ($entries as $entry) {
23 1
                $entryValues[$entry['Name']] = $entry['Value'];
24
            }
25
        }
26
27 1
        $this->dispatch(__FUNCTION__, [$login, $actionId, $entryValues]);
28 1
    }
29
}
30