Code Duplication    Length = 3-7 lines in 2 locations

_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php 2 locations

@@ 867-869 (lines=3) @@
864
			return new WP_Error( 'not_installed', esc_html__( 'Please install Akismet.', 'jetpack' ), array( 'status' => 400 ) );
865
		}
866
867
		if ( ! class_exists( 'Akismet' ) ) {
868
			return new WP_Error( 'not_active', esc_html__( 'Please activate Akismet.', 'jetpack' ), array( 'status' => 400 ) );
869
		}
870
871
		// What about if Akismet is put in a sub-directory or maybe in mu-plugins?
872
		require_once WP_PLUGIN_DIR . '/akismet/class.akismet.php';
@@ 1063-1069 (lines=7) @@
1060
	 * @return mixed|WP_Error VaultPress site data. Otherwise, a WP_Error instance with the corresponding error.
1061
	 */
1062
	public function get_vaultpress_data() {
1063
		if ( ! class_exists( 'VaultPress' ) ) {
1064
			return new WP_Error(
1065
				'not_active',
1066
				esc_html__( 'The requested Jetpack module is not active.', 'jetpack' ),
1067
				array( 'status' => 404 )
1068
			);
1069
		}
1070
1071
		$vaultpress = new VaultPress();
1072
		if ( ! $vaultpress->is_registered() ) {