Code Duplication    Length = 3-3 lines in 4 locations

json-endpoints/jetpack/class.jetpack-json-api-themes-modify-endpoint.php 2 locations

@@ 79-81 (lines=3) @@
76
			$this->log[ $theme ][] = $upgrader->skin->get_upgrade_messages();
77
		}
78
79
		if ( ! $this->bulk && ! $result ) {
80
			return new WP_Error( 'update_fail', __( 'There was an error updating your theme', 'jetpack' ), 400 );
81
		}
82
83
		return true;
84
	}
@@ 123-125 (lines=3) @@
120
			$this->log[ $theme ] = $upgrader->skin->get_upgrade_messages();
121
		}
122
123
		if ( ! $this->bulk && ! $result ) {
124
			return new WP_Error( 'update_fail', __( 'There was an error updating your theme', 'jetpack' ), 400 );
125
		}
126
127
		return true;
128
	}

json-endpoints/jetpack/class.jetpack-json-api-plugins-modify-endpoint.php 2 locations

@@ 343-345 (lines=3) @@
340
			$this->log[ $plugin ] = $upgrader->skin->get_upgrade_messages();
341
		}
342
343
		if ( ! $this->bulk && ! $result && $update_attempted ) {
344
			return new WP_Error( 'update_fail', __( 'There was an error updating your plugin', 'jetpack' ), 400 );
345
		}
346
347
		return $this->default_action();
348
	}
@@ 397-399 (lines=3) @@
394
			$this->log[$plugin] = $upgrader->skin->get_upgrade_messages();
395
		}
396
397
		if ( ! $this->bulk && ! $result ) {
398
			return new WP_Error( 'update_fail', __( 'There was an error updating your plugin', 'jetpack' ), 400 );
399
		}
400
401
		return true;
402
	}