Code Duplication    Length = 21-23 lines in 2 locations

app/Http/Controllers/Admin/helpdesk/FormController.php 2 locations

@@ 286-308 (lines=23) @@
283
        return self::requiredStyle().$html;
284
    }
285
286
    public static function getType($type)
287
    {
288
        switch ($type) {
289
            case 'select':
290
                return 'select';
291
            case 'text':
292
                return 'text';
293
            case 'email':
294
                return 'email';
295
            case 'textarea':
296
                return 'textarea';
297
            case 'select':
298
                return 'select';
299
            case 'radio':
300
                return 'radio';
301
            case 'checkbox':
302
                return 'checkbox';
303
            case 'hidden':
304
                return 'hidden';
305
            case 'password':
306
                return 'password';
307
        }
308
    }
309
310
    public static function getAttribute($type)
311
    {
@@ 310-330 (lines=21) @@
307
        }
308
    }
309
310
    public static function getAttribute($type)
311
    {
312
        switch ($type) {
313
            case 'select':
314
                return "null,['class'=>'form-control']";
315
            case 'text':
316
                return "['class'=>'form-control']";
317
            case 'email':
318
                return "['class'=>'form-control']";
319
            case 'textarea':
320
                return "['class'=>'form-control']";
321
            case 'radio':
322
                return '';
323
            case 'checkbox':
324
                return '';
325
            case 'hidden':
326
                return '';
327
            case 'password':
328
                return "['class'=>'form-control']";
329
        }
330
    }
331
332
    public static function getForm($field)
333
    {