Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 1124-1130 (lines=7) @@
1121
	 *
1122
	 * @return bool Whether user has the capability 'jetpack_configure_modules'.
1123
	 */
1124
	public static function configure_modules_permission_check() {
1125
		if ( current_user_can( 'jetpack_configure_modules' ) ) {
1126
			return true;
1127
		}
1128
1129
		return new WP_Error( 'invalid_user_permission_configure_modules', self::$user_permissions_error_msg, array( 'status' => rest_authorization_required_code() ) );
1130
	}
1131
1132
	/**
1133
	 * Verify that user can view Jetpack admin page.
@@ 1169-1175 (lines=7) @@
1166
	 *
1167
	 * @return bool Whether user has the capability 'update_settings_permission_check'.
1168
	 */
1169
	public static function update_settings_permission_check() {
1170
		if ( current_user_can( 'jetpack_configure_modules' ) ) {
1171
			return true;
1172
		}
1173
1174
		return new WP_Error( 'invalid_user_permission_manage_settings', self::$user_permissions_error_msg, array( 'status' => rest_authorization_required_code() ) );
1175
	}
1176
1177
	/**
1178
	 * Verify that user can view Jetpack admin page and can activate plugins.