IssueTypesTableSeeder::run()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 194
Code Lines 173

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 194
rs 8.2857
c 0
b 0
f 0
cc 1
eloc 173
nc 1
nop 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
use Illuminate\Database\Seeder;
4
5
class IssueTypesTableSeeder extends Seeder
6
{
7
    /**
8
     * Auto generated seed file.
9
     */
10
    public function run()
11
    {
12
        \DB::table('issue_types')->delete();
13
14
        \DB::table('issue_types')->insert(array(
15
            0 => array(
16
                'id' => 1,
17
                'parent_id' => null,
18
                'slug' => 'new-feature',
19
                'code' => 'NFEA',
20
                'title' => 'New Feature ',
21
                'description' => 'A new feature of the product, which has yet to be developed.',
22
                'color' => 'F15A29',
23
                'position' => 4,
24
                'enabled' => 1,
25
            ),
26
            1 => array(
27
                'id' => 2,
28
                'parent_id' => null,
29
                'slug' => 'bug',
30
                'code' => 'BUG',
31
                'title' => 'Bug',
32
                'description' => 'A problem which impairs or prevents the functions of the product.',
33
                'color' => 'D91821',
34
                'position' => 1,
35
                'enabled' => 1,
36
            ),
37
            2 => array(
38
                'id' => 3,
39
                'parent_id' => null,
40
                'slug' => 'task',
41
                'code' => 'TASK',
42
                'title' => 'Task',
43
                'description' => 'A task that needs to be done.',
44
                'color' => 'FFD00A',
45
                'position' => 2,
46
                'enabled' => 1,
47
            ),
48
            3 => array(
49
                'id' => 4,
50
                'parent_id' => null,
51
                'slug' => 'improvement',
52
                'code' => 'IMPR',
53
                'title' => 'Improvement',
54
                'description' => 'An improvement or enhancement to an existing feature or task.',
55
                'color' => '54C2BC',
56
                'position' => 0,
57
                'enabled' => 1,
58
            ),
59
            4 => array(
60
                'id' => 5,
61
                'parent_id' => null,
62
                'slug' => 'support-request ',
63
                'code' => 'SRES',
64
                'title' => 'Support Request',
65
                'description' => 'Issue that is likely specific to the installation',
66
                'color' => '31BEF3',
67
                'position' => 0,
68
                'enabled' => 1,
69
            ),
70
            5 => array(
71
                'id' => 6,
72
                'parent_id' => null,
73
                'slug' => 'third-party-issue ',
74
                'code' => 'TPAR',
75
                'title' => 'Third-party issue ',
76
            'description' => 'An issue relating to a third-party product (eg. app server) that nevertheless affects this product',
77
                'color' => '4FB94A',
78
                'position' => 0,
79
                'enabled' => 1,
80
            ),
81
            6 => array(
82
                'id' => 7,
83
                'parent_id' => null,
84
                'slug' => 'request ',
85
                'code' => 'REQU',
86
                'title' => 'Request ',
87
                'description' => 'A User Request',
88
                'color' => '4EA4DA',
89
                'position' => 0,
90
                'enabled' => 1,
91
            ),
92
            7 => array(
93
                'id' => 8,
94
                'parent_id' => null,
95
                'slug' => 'feedback',
96
                'code' => 'FBAC',
97
                'title' => 'Feedback',
98
                'description' => null,
99
                'color' => '8A65AE',
100
                'position' => 0,
101
                'enabled' => 1,
102
            ),
103
            8 => array(
104
                'id' => 9,
105
                'parent_id' => null,
106
                'slug' => 'customer-problem',
107
                'code' => 'CUST',
108
                'title' => 'Customer Problem ',
109
                'description' => 'A general description of a customer problem',
110
                'color' => 'E20492',
111
                'position' => 0,
112
                'enabled' => 1,
113
            ),
114
            9 => array(
115
                'id' => 10,
116
                'parent_id' => null,
117
                'slug' => 'infrastructure',
118
                'code' => 'INFR',
119
                'title' => 'Infrastructure',
120
                'description' => null,
121
                'color' => 'CD6AA9',
122
                'position' => 0,
123
                'enabled' => 1,
124
            ),
125
            10 => array(
126
                'id' => 11,
127
                'parent_id' => null,
128
                'slug' => 'marketing-request',
129
                'code' => 'MARK',
130
                'title' => 'Marketing Request',
131
                'description' => 'Request for a blog post, event, or campaign assistance',
132
                'color' => 'F78232',
133
                'position' => 0,
134
                'enabled' => 1,
135
            ),
136
            11 => array(
137
                'id' => 12,
138
                'parent_id' => null,
139
                'slug' => 'documentation',
140
                'code' => 'DOCU',
141
                'title' => 'Documentation',
142
                'description' => null,
143
                'color' => '008AD5',
144
                'position' => 0,
145
                'enabled' => 1,
146
            ),
147
            12 => array(
148
                'id' => 13,
149
                'parent_id' => null,
150
                'slug' => 'experiment',
151
                'code' => 'EXPE',
152
                'title' => 'Experiment',
153
                'description' => null,
154
                'color' => 'E66524',
155
                'position' => 0,
156
                'enabled' => 1,
157
            ),
158
            13 => array(
159
                'id' => 14,
160
                'parent_id' => null,
161
                'slug' => 'ux',
162
                'code' => 'UX',
163
                'title' => 'UX',
164
                'description' => 'A user experience task',
165
                'color' => '2C559A',
166
                'position' => 0,
167
                'enabled' => 1,
168
            ),
169
            14 => array(
170
                'id' => 15,
171
                'parent_id' => null,
172
                'slug' => 'testing-task',
173
                'code' => 'TEST',
174
                'title' => 'Testing Task',
175
                'description' => null,
176
                'color' => 'B32929',
177
                'position' => 0,
178
                'enabled' => 1,
179
            ),
180
            15 => array(
181
                'id' => 16,
182
                'parent_id' => null,
183
                'slug' => 'event',
184
                'code' => 'EVEN',
185
                'title' => 'Event',
186
                'description' => 'Analytics event',
187
                'color' => '6D876A',
188
                'position' => 0,
189
                'enabled' => 1,
190
            ),
191
            16 => array(
192
                'id' => 17,
193
                'parent_id' => null,
194
                'slug' => 'qa-task ',
195
                'code' => 'QATA',
196
                'title' => 'QA Task',
197
                'description' => '',
198
                'color' => '6E4849',
199
                'position' => 0,
200
                'enabled' => 1,
201
            ),
202
        ));
203
    }
204
}
205