Code Duplication    Length = 6-6 lines in 2 locations

tools/find-project-deps.php 2 locations

@@ 30-35 (lines=6) @@
27
28
	// Collect package name→slug mappings.
29
	$package_map = array();
30
	foreach ( glob( "$base/projects/packages/*/composer.json" ) as $file ) {
31
		$json = json_decode( file_get_contents( $file ), true );
32
		if ( isset( $json['name'] ) ) {
33
			$package_map[ $json['name'] ] = substr( $file, $l + 10, -14 );
34
		}
35
	}
36
37
	// Collect js-package name→slug mappings.
38
	$js_package_map = array();
@@ 39-44 (lines=6) @@
36
37
	// Collect js-package name→slug mappings.
38
	$js_package_map = array();
39
	foreach ( glob( "$base/projects/js-packages/*/package.json" ) as $file ) {
40
		$json = json_decode( file_get_contents( $file ), true );
41
		if ( isset( $json['name'] ) ) {
42
			$js_package_map[ $json['name'] ] = substr( $file, $l + 10, -14 );
43
		}
44
	}
45
46
	// Collect dependencies.
47
	foreach ( $output as $slug => &$deps ) {