Code Duplication    Length = 9-14 lines in 2 locations

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

@@ 97-105 (lines=9) @@
94
95
	private function get_theme_details_for_slugs( $theme_slugs ) {
96
		$theme_data = array();
97
		foreach ( $theme_slugs as $slug ) {
98
			$theme = wp_get_theme( $slug );
99
			$theme_data[ $slug ] = array(
100
				'name' => $theme->get( 'Name' ),
101
				'version' => $theme->get( 'Version' ),
102
				'uri' => $theme->get( 'ThemeURI' ),
103
				'slug' => $slug,
104
			);
105
		}
106
		return $theme_data;
107
	}
108
@@ 314-327 (lines=14) @@
311
312
		if ( 'update' === $details['action'] ) {
313
			$themes = array();
314
			foreach ( $details['themes'] as $theme_slug ) {
315
				$theme = wp_get_theme( $theme_slug );
316
317
				if ( ! $theme instanceof WP_Theme ) {
318
					continue;
319
				}
320
321
				$themes[ $theme_slug ] = array(
322
					'name' => $theme->get( 'Name' ),
323
					'version' => $theme->get( 'Version' ),
324
					'uri' => $theme->get( 'ThemeURI' ),
325
					'stylesheet' => $theme->stylesheet,
326
				);
327
			}
328
329
			if ( empty( $themes ) ) {
330
				return;