Code Duplication    Length = 8-8 lines in 2 locations

projects/packages/password-checker/src/class-password-checker.php 1 location

@@ 517-524 (lines=8) @@
514
	 * @param String $char character.
515
	 * @return Integer the character code.
516
	 */
517
	protected function get_char_index( $char ) {
518
		$char = strtolower( $char[0] );
519
		if ( $char < 'a' || $char > 'z' ) {
520
			return 0;
521
		} else {
522
			return ord( $char[0] ) - ord( 'a' ) + 1;
523
		}
524
	}
525
526
	/**
527
	 * This is the password strength calculation algorithm, based on the formula H = L(logN/log2).

projects/plugins/jetpack/_inc/lib/class.jetpack-password-checker.php 1 location

@@ 505-512 (lines=8) @@
502
	 * @param String $char character.
503
	 * @return Integer the character code.
504
	 */
505
	protected function get_char_index( $char ) {
506
		$char = strtolower( $char[0] );
507
		if ( $char < 'a' || $char > 'z' ) {
508
			return 0;
509
		} else {
510
			return ord( $char[0] ) - ord( 'a' ) + 1;
511
		}
512
	}
513
514
	/**
515
	 * This is the password strength calculation algorithm, based on the formula H = L(logN/log2).