Items   A
last analyzed

Complexity

Total Complexity 21

Size/Duplication

Total Lines 130
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 21
lcom 1
cbo 0
dl 0
loc 130
ccs 0
cts 100
cp 0
rs 10
c 0
b 0
f 0

22 Methods

Rating   Name   Duplication   Size   Complexity  
getEntityInformations() 0 1 ?
retreiveField() 0 1 ?
A averageItemLevel() 0 5 1
A averageItemLevelEquipped() 0 6 1
A head() 0 6 1
A neck() 0 6 1
A shoulder() 0 6 1
A back() 0 6 1
A chest() 0 6 1
A wrist() 0 6 1
A hands() 0 6 1
A waist() 0 6 1
A legs() 0 6 1
A feet() 0 6 1
A finger1() 0 6 1
A finger2() 0 6 1
A trinket1() 0 6 1
A trinket2() 0 6 1
A mainHand() 0 6 1
A offHand() 0 6 2
A shirt() 0 6 1
A tabard() 0 6 1
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