Code Duplication    Length = 5-7 lines in 2 locations

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

@@ 161-165 (lines=5) @@
158
		$entropy_bits = $this->calculate_entropy_bits( $this->password );
159
160
		// If we have failed the entropy bits test, run the regex tests so we can suggest improvements.
161
		if ( $entropy_bits < $this->minimum_entropy_bits ) {
162
			$results['failed']['entropy_bits'] = $entropy_bits;
163
			// Run the tests.
164
			$results = array_merge( $results, $this->run_tests( $this->get_tests( 'preg_match' ) ) );
165
		}
166
167
		return ( array(
168
			'passed'       => empty( $results['failed'] ),

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

@@ 155-161 (lines=7) @@
152
		$entropy_bits = $this->calculate_entropy_bits( $this->password );
153
154
		// If we have failed the entropy bits test, run the regex tests so we can suggest improvements.
155
		if ( $entropy_bits < $bits ) {
156
			$results['failed']['entropy_bits'] = $entropy_bits;
157
			$results                           = array_merge(
158
				$results,
159
				$this->run_tests( $this->list_tests( 'preg_match' ), false )
160
			);
161
		}
162
163
		return( array(
164
			'passed'       => empty( $results['failed'] ),