<?php
/**
 * Shared helpers for the Mail Doctor admin controller.
 *
 * @package MailDoctor
 */

namespace MailDoctor\Admin\Modules;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Common guard and utility methods reused across traits.
 */
trait Shared_Trait {

	/**
	 * Ensure current user has capability.
	 *
	 * @return void
	 */
	protected static function assert_capability(): void {
		if ( ! self::user_has_access() ) {
			wp_die( esc_html__( 'You do not have permission to access Mail Doctor.', 'mail-doctor' ) );
		}
	}


}
