Items::averageItemLevel()   A
last analyzed

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
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
crap 2
1
<?php namespace GameScan\WoW\Entity\Player;
2
3
trait Items
4
{
5
6
    abstract public function getEntityInformations();
7
    abstract public function retreiveField($fielName);
8
9
    public function averageItemLevel()
10
    {
11
        $this->retreiveField("items");
12
        return $this->getEntityInformations()->items->averageItemLevel;
13
    }
14
15
    public function averageItemLevelEquipped()
16
    {
17
        $this->retreiveField("items");
18
19
        return $this->getEntityInformations()->items->averageItemLevelEquipped;
20
    }
21
22
    public function head()
23
    {
24
        $this->retreiveField("items");
25
26
        return $this->getEntityInformations()->items->head;
27
    }
28
    public function neck()
29
    {
30
        $this->retreiveField("items");
31
32
        return $this->getEntityInformations()->items->neck;
33
    }
34
    public function shoulder()
35
    {
36
        $this->retreiveField("items");
37
38
        return $this->getEntityInformations()->items->shoulder;
39
    }
40
    public function back()
41
    {
42
        $this->retreiveField("items");
43
44
        return $this->getEntityInformations()->items->back;
45
    }
46
    public function chest()
47
    {
48
        $this->retreiveField("items");
49
50
        return $this->getEntityInformations()->items->chest;
51
    }
52
    public function wrist()
53
    {
54
        $this->retreiveField("items");
55
56
        return $this->getEntityInformations()->items->wrist;
57
    }
58
    public function hands()
59
    {
60
        $this->retreiveField("items");
61
62
        return $this->getEntityInformations()->items->hands;
63
    }
64
    public function waist()
65
    {
66
        $this->retreiveField("items");
67
68
        return $this->getEntityInformations()->items->waist;
69
    }
70
    public function legs()
71
    {
72
        $this->retreiveField("items");
73
74
        return $this->getEntityInformations()->items->legs;
75
    }
76
    public function feet()
77
    {
78
        $this->retreiveField("items");
79
80
        return $this->getEntityInformations()->items->feet;
81
    }
82
    public function finger1()
83
    {
84
        $this->retreiveField("items");
85
86
        return $this->getEntityInformations()->items->finger1;
87
    }
88
    public function finger2()
89
    {
90
        $this->retreiveField("items");
91
92
        return $this->getEntityInformations()->items->finger2;
93
    }
94
    public function trinket1()
95
    {
96
        $this->retreiveField("items");
97
98
        return $this->getEntityInformations()->items->trinket1;
99
    }
100
    public function trinket2()
101
    {
102
        $this->retreiveField("items");
103
104
        return $this->getEntityInformations()->items->trinket2;
105
    }
106
    public function mainHand()
107
    {
108
        $this->retreiveField("items");
109
110
        return $this->getEntityInformations()->items->mainHand;
111
    }
112
    public function offHand()
113
    {
114
        $this->retreiveField("items");
115
116
        return isset($this->getEntityInformations()->items->offHand) ? $this->getEntityInformations()->items->offHand : null;
117
    }
118
119
    public function shirt()
120
    {
121
        $this->retreiveField("items");
122
123
        return $this->getEntityInformations()->items->shirt;
124
    }
125
126
    public function tabard()
127
    {
128
        $this->retreiveField("items");
129
130
        return $this->getEntityInformations()->items->tabard;
131
    }
132
}
133