Code Duplication    Length = 18-18 lines in 2 locations

class/partner.php 2 locations

@@ 523-540 (lines=18) @@
520
                }
521
                break;
522
523
            case _SPARTNER_STATUS_SUBMITTED:
524
                switch ($new_status) {
525
                    case _SPARTNER_STATUS_ACTIVE:
526
                        $redirect_msgs['success'] = _AM_SPARTNER_SUBMITTED_ACTIVE_SUCCESS;
527
                        $redirect_msgs['error']   = _AM_SPARTNER_PARTNER_NOT_UPDATED;
528
                        break;
529
530
                    case _SPARTNER_STATUS_INACTIVE:
531
                        $redirect_msgs['success'] = _AM_SPARTNER_SUBMITTED_INACTIVE_SUCCESS;
532
                        $redirect_msgs['error']   = _AM_SPARTNER_PARTNER_NOT_UPDATED;
533
                        break;
534
535
                    case _SPARTNER_STATUS_REJECTED:
536
                        $redirect_msgs['success'] = _AM_SPARTNER_SUBMITTED_REJECTED_SUCCESS;
537
                        $redirect_msgs['error']   = _AM_SPARTNER_PARTNER_NOT_UPDATED;
538
                        break;
539
                }
540
                break;
541
542
            case _SPARTNER_STATUS_ACTIVE:
543
                switch ($new_status) {
@@ 572-589 (lines=18) @@
569
                }
570
                break;
571
572
            case _SPARTNER_STATUS_REJECTED:
573
                switch ($new_status) {
574
                    case _SPARTNER_STATUS_ACTIVE:
575
                        $redirect_msgs['success'] = _AM_SPARTNER_REJECTED_ACTIVE_SUCCESS;
576
                        $redirect_msgs['error']   = _AM_SPARTNER_PARTNER_NOT_UPDATED;
577
                        break;
578
579
                    case _SPARTNER_STATUS_INACTIVE:
580
                        $redirect_msgs['success'] = _AM_SPARTNER_REJECTED_INACTIVE_SUCCESS;
581
                        $redirect_msgs['error']   = _AM_SPARTNER_PARTNER_NOT_UPDATED;
582
                        break;
583
584
                    case _SPARTNER_STATUS_REJECTED:
585
                        $redirect_msgs['success'] = _AM_SPARTNER_REJECTED_REJECTED_SUCCESS;
586
                        $redirect_msgs['error']   = _AM_SPARTNER_PARTNER_NOT_UPDATED;
587
                        break;
588
                }
589
                break;
590
        }
591
592
        return $redirect_msgs;