Code Duplication    Length = 18-18 lines in 2 locations

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

@@ 314-331 (lines=18) @@
311
	 * @param array $test_data the current test data.
312
	 * @return Boolean does the test pass?
313
	 */
314
	protected function test_compare_to_list( $test_data ) {
315
		$list_callback    = $test_data['list_callback'];
316
		$compare_callback = $test_data['compare_callback'];
317
318
		if (
319
			! is_callable( array( $this, $list_callback ) )
320
			|| ! is_callable( array( $this, $compare_callback ) )
321
		) {
322
			return false;
323
		}
324
325
		$list = call_user_func( array( $this, $list_callback ) );
326
		if ( empty( $list ) ) {
327
			return true;
328
		}
329
330
		return call_user_func( array( $this, $compare_callback ), $this->password, $list );
331
	}
332
333
	/**
334
	 * Getter for the common password list.

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

@@ 322-339 (lines=18) @@
319
	 * @param array $test_data the current test data.
320
	 * @return Boolean does the test pass?
321
	 */
322
	protected function test_compare_to_list( $test_data ) {
323
		$list_callback    = $test_data['list_callback'];
324
		$compare_callback = $test_data['compare_callback'];
325
326
		if (
327
			! is_callable( array( $this, $list_callback ) )
328
			|| ! is_callable( array( $this, $compare_callback ) )
329
		) {
330
			return false;
331
		}
332
333
		$list = call_user_func( array( $this, $list_callback ) );
334
		if ( empty( $list ) ) {
335
			return true;
336
		}
337
338
		return call_user_func( array( $this, $compare_callback ), $this->password, $list );
339
	}
340
341
	/**
342
	 * Getter for the common password list.