Code Duplication    Length = 14-14 lines in 2 locations

projects/packages/autoloader/src/class-php-autoloader.php 1 location

@@ 68-81 (lines=14) @@
65
	 *
66
	 * @return bool Indicates whether or not a class file was loaded.
67
	 */
68
	public static function load_class( $class_name ) {
69
		global $jetpack_autoloader_loader;
70
		if ( ! isset( $jetpack_autoloader_loader ) ) {
71
			return;
72
		}
73
74
		$file = $jetpack_autoloader_loader->find_class_file( $class_name );
75
		if ( ! isset( $file ) ) {
76
			return false;
77
		}
78
79
		require $file;
80
		return true;
81
	}
82
}
83

projects/packages/autoloader/tests/php/data/plugins/plugin_v2_4_0/vendor/jetpack-autoloader/autoload_functions.php 1 location

@@ 19-32 (lines=14) @@
16
 *
17
 * @return Boolean Whether the class_name was found in the classmap.
18
 */
19
function autoloader( $class_name ) {
20
	global $jetpack_autoloader_loader;
21
	if ( ! isset( $jetpack_autoloader_loader ) ) {
22
		return false;
23
	}
24
25
	$file = $jetpack_autoloader_loader->find_class_file( $class_name );
26
	if ( ! isset( $file ) ) {
27
		return false;
28
	}
29
30
	require_once $file;
31
	return true;
32
}
33
34
/**
35
 * Finds the latest installed autoloader. If this is the latest autoloader, sets