Passed
Push — master ( 39d8dd...cba0a9 )
by Karthik
10:35
created

GameConstants::listDungeons()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 68
Code Lines 66

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 66
nc 1
nop 0
dl 0
loc 68
ccs 0
cts 0
cp 0
crap 2
rs 8.7418
c 0
b 0
f 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
namespace cyberinferno\Cabal\Helpers;
4
5
/**
6
 * Class GameConstants
7
 *
8
 * Contains explanations for many constants used in Cabal Online server
9
 *
10
 * @package cyberinferno\Cabal\Helpers
11
 * @author Karthik P
12
 */
13
class GameConstants
14
{
15 3
    public static function listClasses()
16
    {
17
        return [
18 3
            1 => 'Warrior',
19
            2 => 'Blader',
20
            3 => 'Wizard',
21
            4 => 'Force Archer',
22
            5 => 'Force Shielder',
23
            6 => 'Force Blader'
24
        ];
25
    }
26
27 3
    public static function listNations()
28
    {
29
        return [
30 3
            0 => 'Neutral',
31
            1 => 'Capella',
32
            2 => 'Procyon',
33
            3 => 'GM'
34
        ];
35
    }
36
37 3
    public static function listRanks()
38
    {
39
        return [
40 3
            257 => 'Novice',
41
            514 => 'Apprentice',
42
            771 => 'Regular',
43
            1028 => 'Expert',
44
            1285 => 'A.Expert',
45
            1542 => 'Master',
46
            1799 => 'A.Master',
47
            2056 => 'G.Master',
48
            2313 => 'Completer',
49
            2570 => 'Transcender'
50
        ];
51
    }
52
53 3
    public static function listAuras()
54
    {
55
        return [
56 3
            0 => 'None',
57
            2 => 'Land Aura',
58
            4 => 'Aqua Aura',
59
            6 => 'Wind Aura',
60
            8 => 'Flame Aura',
61
            10 => 'Freezing Aura',
62
            12 => 'Lightning Aura'
63
        ];
64
    }
65
66 3
    public static function listItemDurations()
67
    {
68
        return [
69 3
            0 => 'No Duration',
70
            1 => '1 Hour',
71
            2 => '2 Hours',
72
            3 => '3 Hours',
73
            4 => '4 Hours',
74
            5 => '5 Hours',
75
            6 => '6 Hours',
76
            7 => '10 Hours',
77
            8 => '12 Hours',
78
            9 => '1 Day',
79
            10 => '3 Days',
80
            11 => '5 Days',
81
            12 => '7 Days',
82
            13 => '10 Days',
83
            14 => '14 Days',
84
            15 => '15 Days',
85
            16 => '20 Days',
86
            17 => '30 Days',
87
            18 => '45 Days',
88
            19 => '60 Days',
89
            20 => '90 Days',
90
            21 => '100 Days',
91
            22 => '120 Days',
92
            23 => '180 Days',
93
            24 => '270 Days',
94
            25 => '365 Days',
95
            31 => 'Permanent'
96
        ];
97
    }
98
99 3
    public static function listBindings()
100
    {
101
        return [
102 3
            0 => 'None',
103
            4096 => 'Account Binding',
104
            524288 => 'Character Binding',
105
            1572864 => 'Character Binding on Usage'
106
        ];
107
    }
108
109
    public static function listDungeons()
110
    {
111
        return [
112
            218 => 'Frozen Tower of Undead(B1F)',
113
            245 => 'Ruina Station',
114
            253 => 'Frozen Tower of Undead(B2F) Part1',
115
            4276 => 'Chaos Arena Eternity',
116
            4263 => 'Tower of Undead B3F',
117
            294 => 'Forgotten Temple B1F',
118
            293 => 'Volcanic Citadel',
119
            4096 => 'Forgotten Temple B2F',
120
            4097 => 'Forbidden Island',
121
            4098 => 'Altar of Siena B1F',
122
            4099 => 'Altar of Siena B2F',
123
            4100 => 'Panic Cave (Easy)',
124
            4101 => 'Panic Cave (Normal)',
125
            4102 => 'Panic Cave (Hard)',
126
            4103 => 'Steamer Crazy (Easy)',
127
            4104 => 'Steamer Crazy (Normal)',
128
            4105 => 'Steamer Crazy (Hard)',
129
            4106 => 'Illusion Castle Underworld',
130
            4107 => 'Catacomb Frost (Easy)',
131
            4108 => 'Catacomb Frost (Normal)',
132
            4109 => 'Catacomb Frost (Hard)',
133
            4110 => 'Illusion Castle Radiant Hall',
134
            4283 => 'Abandoned City',
135
            4265 => 'Forbidden Island (Awakened)',
136
            4336 => 'Tower of the Dead B3F (Part2)',
137
            4337 => 'Legend Arena',
138
            4111 => 'Chaos Arena Lv.1',
139
            4112 => 'Chaos Arena Lv.2',
140
            4113 => 'Chaos Arena Lv.3',
141
            4114 => 'Chaos Arena Lv.4',
142
            4115 => 'Chaos Arena Lv.5',
143
            4116 => 'Chaos Arena Lv.6',
144
            4117 => 'Panic Cave (Premium)',
145
            4118 => 'Steamer Crazy (Premium)',
146
            4119 => 'Catacomb Frost (Premium)',
147
            4338 => 'Glacies Inferna',
148
            4121 => 'Lava Hellfire (Easy)',
149
            4122 => 'Lava Hellfire (Medium)',
150
            4123 => 'Lava Hellfire (Hard)',
151
            4124 => 'Lava Hellfire (Premium)',
152
            4220 => 'Maquinas Outpost',
153
            4248 => 'Hazardous Valley (Easy)',
154
            4249 => 'Hazardous Valley (Normal)',
155
            4250 => 'Hazardous Valley (Hard)',
156
            4251 => 'Chaos Arena Infinity',
157
            4253 => 'Frozen Colosseum',
158
            4254 => 'Frozen Colosseum',
159
            4255 => 'Frozen Colosseum',
160
            4264 => 'Forgotten Temple B2F (Awakened)',
161
            4277 => 'Lava Hellfire (Awakened)',
162
            4278 => 'Panic Cave (Awakened)',
163
            4279 => 'Steamer Crazy (Awakened)',
164
            4280 => 'Catacomb Frost (Awakened)',
165
            4282 => 'Hazardous Valley (Awakened)',
166
            4339 => 'Illusion Castle Underworld(Apocrypha)',
167
            4340 => 'Illusion Castle Radiant Hall(Apocrypha)',
168
            4341 => 'Edge of Phantom',
169
            4342 => 'Forgotten Temple B3F',
170
            4343 => 'Acheron Arena',
171
            4344 => 'Devil\'s Tower',
172
            4345 => 'Devil\'s Tower (Part2)',
173
            4346 => 'Pandemonium',
174
            4347 => 'Mirage Island',
175
            4348 => 'Flame Nest',
176
            4349 => 'Holy Windmill'
177
        ];
178
    }
179
}