Code Duplication    Length = 9-14 lines in 2 locations

packages/sync/src/modules/Themes.php 2 locations

@@ 104-112 (lines=9) @@
101
102
	private function get_theme_details_for_slugs( $theme_slugs ) {
103
		$theme_data = array();
104
		foreach ( $theme_slugs as $slug ) {
105
			$theme               = wp_get_theme( $slug );
106
			$theme_data[ $slug ] = array(
107
				'name'    => $theme->get( 'Name' ),
108
				'version' => $theme->get( 'Version' ),
109
				'uri'     => $theme->get( 'ThemeURI' ),
110
				'slug'    => $slug,
111
			);
112
		}
113
		return $theme_data;
114
	}
115
@@ 326-339 (lines=14) @@
323
				$details['themes'] = array( $details['theme'] );
324
			}
325
326
			foreach ( $details['themes'] as $theme_slug ) {
327
				$theme = wp_get_theme( $theme_slug );
328
329
				if ( ! $theme instanceof \WP_Theme ) {
330
					continue;
331
				}
332
333
				$themes[ $theme_slug ] = array(
334
					'name'       => $theme->get( 'Name' ),
335
					'version'    => $theme->get( 'Version' ),
336
					'uri'        => $theme->get( 'ThemeURI' ),
337
					'stylesheet' => $theme->stylesheet,
338
				);
339
			}
340
341
			if ( empty( $themes ) ) {
342
				return;