Code Duplication    Length = 35-51 lines in 2 locations

app/Functions/Functions.php 2 locations

@@ 466-516 (lines=51) @@
463
	 */
464
	public static function cousinName($n, $sex) {
465
		switch ($sex) {
466
		case 'M':
467
			switch ($n) {
468
			case  1:
469
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
470
			return I18N::translateContext('MALE', 'first cousin');
471
			case  2:
472
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
473
			return I18N::translateContext('MALE', 'second cousin');
474
			case  3:
475
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
476
			return I18N::translateContext('MALE', 'third cousin');
477
			case  4:
478
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
479
			return I18N::translateContext('MALE', 'fourth cousin');
480
			case  5:
481
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
482
			return I18N::translateContext('MALE', 'fifth cousin');
483
			case  6:
484
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
485
			return I18N::translateContext('MALE', 'sixth cousin');
486
			case  7:
487
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
488
			return I18N::translateContext('MALE', 'seventh cousin');
489
			case  8:
490
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
491
			return I18N::translateContext('MALE', 'eighth cousin');
492
			case  9:
493
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
494
			return I18N::translateContext('MALE', 'ninth cousin');
495
			case 10:
496
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
497
			return I18N::translateContext('MALE', 'tenth cousin');
498
			case 11:
499
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
500
			return I18N::translateContext('MALE', 'eleventh cousin');
501
			case 12:
502
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
503
			return I18N::translateContext('MALE', 'twelfth cousin');
504
			case 13:
505
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
506
			return I18N::translateContext('MALE', 'thirteenth cousin');
507
			case 14:
508
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
509
			return I18N::translateContext('MALE', 'fourteenth cousin');
510
			case 15:
511
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
512
			return I18N::translateContext('MALE', 'fifteenth cousin');
513
			default:
514
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
515
			return I18N::translateContext('MALE', '%s × cousin', I18N::number($n));
516
			}
517
		case 'F':
518
			switch ($n) {
519
			case  1:
@@ 517-551 (lines=35) @@
514
			/* I18N: Note that for Italian and Polish, “N’th cousins” are different from English “N’th cousins”, and the software has already generated the correct “N” for your language. You only need to translate - you do not need to convert. For other languages, if your cousin rules are different from English, please contact the developers. */
515
			return I18N::translateContext('MALE', '%s × cousin', I18N::number($n));
516
			}
517
		case 'F':
518
			switch ($n) {
519
			case  1:
520
			return I18N::translateContext('FEMALE', 'first cousin');
521
			case  2:
522
			return I18N::translateContext('FEMALE', 'second cousin');
523
			case  3:
524
			return I18N::translateContext('FEMALE', 'third cousin');
525
			case  4:
526
			return I18N::translateContext('FEMALE', 'fourth cousin');
527
			case  5:
528
			return I18N::translateContext('FEMALE', 'fifth cousin');
529
			case  6:
530
			return I18N::translateContext('FEMALE', 'sixth cousin');
531
			case  7:
532
			return I18N::translateContext('FEMALE', 'seventh cousin');
533
			case  8:
534
			return I18N::translateContext('FEMALE', 'eighth cousin');
535
			case  9:
536
			return I18N::translateContext('FEMALE', 'ninth cousin');
537
			case 10:
538
			return I18N::translateContext('FEMALE', 'tenth cousin');
539
			case 11:
540
			return I18N::translateContext('FEMALE', 'eleventh cousin');
541
			case 12:
542
			return I18N::translateContext('FEMALE', 'twelfth cousin');
543
			case 13:
544
			return I18N::translateContext('FEMALE', 'thirteenth cousin');
545
			case 14:
546
			return I18N::translateContext('FEMALE', 'fourteenth cousin');
547
			case 15:
548
			return I18N::translateContext('FEMALE', 'fifteenth cousin');
549
			default:
550
			return I18N::translateContext('FEMALE', '%s × cousin', I18N::number($n));
551
			}
552
		default:
553
			switch ($n) {
554
			case  1: