Code Duplication    Length = 17-17 lines in 2 locations

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

@@ 64-80 (lines=17) @@
61
			case 'update':
62
				$errors = $this->get_errors( $upgrader->skin );
63
				var_dump( $plugins );
64
				if ( $errors ) {
65
					foreach ( $plugins as $slug ) {
66
						/**
67
						 * Sync that a plugin update failed
68
						 *
69
						 * @since 5.8.0
70
						 *
71
						 * @module sync
72
						 *
73
						 * @param string $plugin, Plugin slug
74
						 * @param string Error code
75
						 * @param string Error message
76
						 */
77
						do_action( 'jetpack_plugin_update_failed', $this->get_plugin_info( $slug ), $errors['code'], $errors['message'] );
78
					}
79
					return;
80
				}
81
				/**
82
				 * Sync that a plugin update
83
				 *
@@ 98-114 (lines=17) @@
95
96
		if ( 'install' === $details['action'] ) {
97
			$errors = $this->get_errors( $upgrader->skin );
98
			if ( $errors ) {
99
				foreach ( $plugins as $slug ) {
100
					/**
101
					 * Sync that a plugin update failed
102
					 *
103
					 * @since 5.8.0
104
					 *
105
					 * @module sync
106
					 *
107
					 * @param string $plugin, Plugin slug
108
					 * @param string Error code
109
					 * @param string Error message
110
					 */
111
					do_action( 'jetpack_plugin_install_failed', $this->get_plugin_info( $slug ), $errors['code'], $errors['message'] );
112
				}
113
				return;
114
			}
115
			/**
116
			 * Signals to the sync listener that a plugin was installed and a sync action
117
			 * reflecting the installation and the plugin info should be sent