<?php
/**
 * HappyFenceNG Total Enterprise Security Plugin
 * HAPPYWPRESS is a RazorVue Trademark.
 *
 * @package     HappyFenceNG
 * @developer   Simonluca Scillitani
 * @copyright   2025 RazorVue di Scillitani Simonluca
 * @link        https://razorvue.it
 * @author      RazorVue di Scillitani Simonluca
 * @brand       HappyWPress
 * @uri         https://happywpress.com
 * @set all
 */

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

/**PHPCS -> code compliance: we put useful comments where needed.. */
class HappyFenceNGCFProps extends HappyFenceNGAProps {
	public const _DEFAULT_IPV4 = array(
		'173.245.48.0/20',
		'103.21.244.0/22',
		'103.22.200.0/22',
		'103.31.4.0/22',
		'141.101.64.0/18',
		'108.162.192.0/18',
		'190.93.240.0/20',
		'188.114.96.0/20',
		'197.234.240.0/22',
		'198.41.128.0/17',
		'162.158.0.0/15',
		'104.16.0.0/13',
		'104.24.0.0/14',
		'172.64.0.0/13',
		'131.0.72.0/22',
	);
	public const _DEFAULT_IPV6 = array(
		'2400:cb00::/32',
		'2606:4700::/32',
		'2803:f800::/32',
		'2405:b500::/32',
		'2405:8100::/32',
		'2a06:98c0::/29',
		'2c0f:f248::/32',
	);

	/**PHPCS -> code compliance: we put useful comments where needed.. */
	protected function __construct() {
		$this->jz( 'enable_cf_guard', HappyFenceNGPlaceholder::BOOL_PROP_DEFAULT );
		$this->jz( 'enable_cf_guard_admin_only', HappyFenceNGPlaceholder::BOOL_PROP_DEFAULT );
		$this->jz( 'allowed_ips', implode( ',', array_merge( self::_DEFAULT_IPV4, self::_DEFAULT_IPV6 ) ) );
		$this->_do();
	}

	/**PHPCS -> code compliance: we put useful comments where needed.. */
	//phpcs:ignore
	protected function _do() {
	}
}
