Code Duplication    Length = 5-8 lines in 2 locations

Service/GeneratorService.php 2 locations

@@ 468-472 (lines=5) @@
465
            case 'Email':
466
                $validate['type'] = "email";
467
                break;
468
            case 'Length':
469
                $validate['type'] = "length";
470
                $validate['max'] = (int)$annotation->max;
471
                $validate['min'] = (int)$annotation->min;
472
                break;
473
            case 'Regex':
474
                if ($annotation->match) {
475
                    $validate['type'] = "format";
@@ 481-488 (lines=8) @@
478
                }
479
                break;
480
            case 'MaxLength':
481
            case 'MinLength':
482
                $validate['type'] = "length";
483
                if ($name == "MaxLength") {
484
                    $validate['max'] = (int)$annotation->limit;
485
                } else {
486
                    $validate['min'] = (int)$annotation->limit;
487
                }
488
                break;
489
            case 'Choice':
490
                $validate['type'] = "inclusion";
491
                $validate['list'] = $annotation->choices;