Code Duplication    Length = 7-7 lines in 2 locations

sync/class.jetpack-sync-module-plugins.php 1 location

@@ 33-39 (lines=7) @@
30
31
	public function check_upgrader( $upgrader, $details) {
32
33
		if ( ! isset( $details['type'] ) ||
34
			'plugin' !== $details['type'] ||
35
			is_wp_error( $upgrader->skin->result ) ||
36
			! method_exists( $upgrader, 'plugin_info' )
37
		) {
38
			return;
39
		}
40
41
		if ( 'install' === $details['action'] ) {
42
			$plugin_path = $upgrader->plugin_info();

sync/class.jetpack-sync-module-themes.php 1 location

@@ 173-179 (lines=7) @@
170
	}
171
172
	public function check_upgrader( $upgrader, $details) {
173
		if ( ! isset( $details['type'] ) ||
174
		     'theme' !== $details['type'] ||
175
		     is_wp_error( $upgrader->skin->result ) ||
176
		     ! method_exists( $upgrader, 'theme_info' )
177
		) {
178
			return;
179
		}
180
181
		$theme = $upgrader->theme_info();
182
		if ( ! $theme instanceof WP_Theme ) {