Player::getRessource()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php namespace GameScan\WoW\Entity;
2
3
use GameScan\WoW\WowApiRequest;
4
use GameScan\WoW\Entity\Player\Base as PlayerBase;
5
use GameScan\WoW\Entity\Player\Items as PlayerItems;
6
use GameScan\WoW\Entity\Player\Guild as PlayerGuild;
7
use GameScan\WoW\Entity\Player\Talents as PlayerTalents;
8
use GameScan\WoW\Entity\Player\Progression as PlayerProgression;
9
use GameScan\WoW\Entity\Player\Feed as PlayerFeed;
10
11
class Player extends Base
12
{
13
    use PlayerBase, PlayerItems, PlayerGuild, PlayerTalents, PlayerProgression, PlayerFeed;
14
    protected $realmName;
15
    protected $characterName;
16
17
    public function __construct(WowApiRequest $api, $realmName, $characterName, $locale = null, array $scope = null)
18
    {
19
        $this->apiRequest = $api;
20
        $this->realmName = $realmName;
21
        $this->characterName = $characterName;
22
        if ($locale !== null) {
23
            $this->apiRequest->setLocale($locale);
24
        }
25
        if ($scope !== null) {
26
            foreach ($scope as $field) {
27
                $this->addField($field);
28
            }
29
        }
30
        $this->loadInformation();
31
    }
32
33
    public function getRessource()
34
    {
35
        return "wow/character/" . $this->realmName . "/" . $this->characterName;
36
    }
37
}
38