Code Duplication    Length = 5-7 lines in 2 locations

require/class.Spotter.php 2 locations

@@ 8591-8595 (lines=5) @@
8588
		//determine which characters are being used and convert the registration code appropiately
8589
		if (strlen($registration_prefix) == 1)
8590
		{
8591
			if (0 === strpos($registration, 'N')) {
8592
                $registration = preg_replace("/^(.{1})/", "$1", $registration);
8593
            } else {
8594
                $registration = preg_replace("/^(.{1})/", "$1-", $registration);
8595
            }
8596
		} else if(strlen($registration_prefix) == 2){
8597
            if (0 === strpos($registration, 'N')) {
8598
                $registration = preg_replace("/^(.{2})/", "$1", $registration);
@@ 8596-8602 (lines=7) @@
8593
            } else {
8594
                $registration = preg_replace("/^(.{1})/", "$1-", $registration);
8595
            }
8596
		} else if(strlen($registration_prefix) == 2){
8597
            if (0 === strpos($registration, 'N')) {
8598
                $registration = preg_replace("/^(.{2})/", "$1", $registration);
8599
            } else {
8600
                $registration = preg_replace("/^(.{2})/", "$1-", $registration);
8601
            }
8602
		}
8603
8604
		return $registration;	
8605
	}