Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 77-90 (lines=14) @@
74
	 * @param array  $data The data for the entry we're registering.
75
	 * @param array  $path_map The path map to add the contents of the manifest to.
76
	 */
77
	protected function register_record( $key, $data, &$path_map ) {
78
		if ( isset( $path_map[ $key ]['version'] ) ) {
79
			$selected_version = $path_map[ $key ]['version'];
80
		} else {
81
			$selected_version = null;
82
		}
83
84
		if ( $this->version_selector->is_version_update_required( $selected_version, $data['version'] ) ) {
85
			$path_map[ $key ] = array(
86
				'version' => $data['version'],
87
				'path'    => $data['path'],
88
			);
89
		}
90
	}
91
}
92

projects/packages/autoloader/tests/php/data/plugins/plugin_v2_4_0/vendor/jetpack-autoloader/class-manifest-handler.php 1 location

@@ 93-106 (lines=14) @@
90
	 * @param array  $data The data for the entry we're registering.
91
	 * @param array  $path_map The path map to add the contents of the manifest to.
92
	 */
93
	protected function register_record( $key, $data, &$path_map ) {
94
		if ( isset( $path_map[ $key ]['version'] ) ) {
95
			$selected_version = $path_map[ $key ]['version'];
96
		} else {
97
			$selected_version = null;
98
		}
99
100
		if ( $this->version_selector->is_version_update_required( $selected_version, $data['version'] ) ) {
101
			$path_map[ $key ] = array(
102
				'version' => $data['version'],
103
				'path'    => $data['path'],
104
			);
105
		}
106
	}
107
}
108