Code Duplication    Length = 7-7 lines in 2 locations

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

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

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

@@ 24-30 (lines=7) @@
21
	}
22
23
	public function check_upgrader( $upgrader, $details) {
24
		if ( ! isset( $details['type'] ) ||
25
			'theme' !== $details['type'] ||
26
			is_wp_error( $upgrader->skin->result ) ||
27
			! method_exists( $upgrader, 'theme_info' )
28
		) {
29
			return;
30
		}
31
32
		if ( 'install' === $details['action'] ) {
33
			$theme = $upgrader->theme_info();