Code Duplication    Length = 7-7 lines in 2 locations

packages/autoloader/src/CustomAutoloaderPlugin.php 2 locations

@@ 141-147 (lines=7) @@
138
		}
139
140
		// Reuse our own suffix, if any.
141
		if ( is_readable( $vendorPath . '/autoload_packages.php' ) ) {
142
			// phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
143
			$content = file_get_contents( $vendorPath . '/autoload_packages.php' );
144
			if ( preg_match( '/^namespace Automattic\\\\Jetpack\\\\Autoloader\\\\jp([^;\s]+);/m', $content, $match ) ) {
145
				return $match[1];
146
			}
147
		}
148
149
		// Reuse Composer's suffix, if any.
150
		if ( is_readable( $vendorPath . '/autoload.php' ) ) {
@@ 150-156 (lines=7) @@
147
		}
148
149
		// Reuse Composer's suffix, if any.
150
		if ( is_readable( $vendorPath . '/autoload.php' ) ) {
151
			// phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents
152
			$content = file_get_contents( $vendorPath . '/autoload.php' );
153
			if ( preg_match( '{ComposerAutoloaderInit([^:\s]+)::}', $content, $match ) ) {
154
				return $match[1];
155
			}
156
		}
157
158
		// Generate a random suffix.
159
		return md5( uniqid( '', true ) );