Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 34-47 (lines=14) @@
31
	 *
32
	 * @return array $path_map The path map we've built using the manifests in each plugin.
33
	 */
34
	public function read_manifests( $plugin_paths, $manifest_path, &$path_map ) {
35
		$file_paths = array_map(
36
			function ( $path ) use ( $manifest_path ) {
37
				return trailingslashit( $path ) . $manifest_path;
38
			},
39
			$plugin_paths
40
		);
41
42
		foreach ( $file_paths as $path ) {
43
			$this->register_manifest( $path, $path_map );
44
		}
45
46
		return $path_map;
47
	}
48
49
	/**
50
	 * Registers a plugin's manifest file with the path map.

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

@@ 50-63 (lines=14) @@
47
	 *
48
	 * @return array $path_map The path map we've built using the manifests in each plugin.
49
	 */
50
	public function register_plugin_manifests( $manifest_path, &$path_map ) {
51
		$file_paths = array_map(
52
			function ( $path ) use ( $manifest_path ) {
53
				return trailingslashit( $path ) . $manifest_path;
54
			},
55
			$this->active_plugin_paths
56
		);
57
58
		foreach ( $file_paths as $path ) {
59
			$this->register_manifest( $path, $path_map );
60
		}
61
62
		return $path_map;
63
	}
64
65
	/**
66
	 * Registers a plugin's manifest file with the path map.