HEX
Server: LiteSpeed
System: Linux eko108.isimtescil.net 4.18.0-477.21.1.lve.1.el8.x86_64 #1 SMP Tue Sep 5 23:08:35 UTC 2023 x86_64
User: uyarreklamcomtr (11202)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/Integer.php.tar
uyarreklam.com.tr/httpdocs/wp-content/plugins/google-listings-and-ads/src/Admin/Input/Integer.php000064400000001253151550533420032056 0ustar00var/www/vhosts<?php
declare( strict_types=1 );

namespace Automattic\WooCommerce\GoogleListingsAndAds\Admin\Input;

defined( 'ABSPATH' ) || exit;

/**
 * Class Integer
 *
 * @package Automattic\WooCommerce\GoogleListingsAndAds\Admin\Input
 */
class Integer extends Input {
	/**
	 * Integer constructor.
	 */
	public function __construct() {
		// Ideally, it should use the 'woocommerce/product-number-field' block
		// but the block doesn't support integer validation. Therefore, it uses
		// the text field block to work around it.
		parent::__construct( 'integer', 'woocommerce/product-text-field' );

		$this->set_block_attribute(
			'pattern',
			[
				'value' => '0|[1-9]\d*',
			]
		);
	}
}