Code Duplication    Length = 9-14 lines in 2 locations

sync/class.jetpack-sync-module-themes.php 2 locations

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