Code Duplication    Length = 9-14 lines in 2 locations

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

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