Code Duplication    Length = 16-16 lines in 2 locations

packages/autoloader/tests/php/data/plugins/plugin_v2_2_0/vendor/class-classes-handler.php 1 location

@@ 50-65 (lines=16) @@
47
	 * @param string $version Version of the class.
48
	 * @param string $path Absolute path to the class so that we can load it.
49
	 */
50
	public function enqueue_package_class( $class_name, $version, $path ) {
51
		global $jetpack_packages_classmap;
52
53
		if ( isset( $jetpack_packages_classmap[ $class_name ]['version'] ) ) {
54
			$selected_version = $jetpack_packages_classmap[ $class_name ]['version'];
55
		} else {
56
			$selected_version = null;
57
		}
58
59
		if ( $this->version_selector->is_version_update_required( $selected_version, $version ) ) {
60
			$jetpack_packages_classmap[ $class_name ] = array(
61
				'version' => $version,
62
				'path'    => $path,
63
			);
64
		}
65
	}
66
67
	/**
68
	 * Creates the path to the plugin's classmap file. The classmap filename is the filename

packages/autoloader/tests/php/data/plugins/plugin_v2_2_0/vendor/class-files-handler.php 1 location

@@ 50-65 (lines=16) @@
47
	 * @param string $version Version of the file.
48
	 * @param string $path Absolute path to the file so that we can load it.
49
	 */
50
	public function enqueue_package_file( $file_identifier, $version, $path ) {
51
		global $jetpack_packages_filemap;
52
53
		if ( isset( $jetpack_packages_filemap[ $file_identifier ]['version'] ) ) {
54
			$selected_version = $jetpack_packages_filemap[ $file_identifier ]['version'];
55
		} else {
56
			$selected_version = null;
57
		}
58
59
		if ( $this->version_selector->is_version_update_required( $selected_version, $version ) ) {
60
			$jetpack_packages_filemap[ $file_identifier ] = array(
61
				'version' => $version,
62
				'path'    => $path,
63
			);
64
		}
65
	}
66
67
	/**
68
	 * Creates a path to the plugin's filemap. The filemap filename is the filename