Automattic\WooCommerce\Admin\RemoteInboxNotifications\Transformers

ArrayColumn::validate()publicWC 1.0

Validate Transformer arguments.

Method of the class: ArrayColumn{}

No Hooks.

Return

Mixed.

Usage

$ArrayColumn = new ArrayColumn();
$ArrayColumn->validate( $arguments );
$arguments(stdClass|null)
arguments to validate.
Default: null

ArrayColumn::validate() code WC 8.7.0

public function validate( stdClass $arguments = null ) {
	if ( ! isset( $arguments->key ) ) {
		return false;
	}

	if (
		null !== $arguments->key &&
		! is_string( $arguments->key ) &&
		! is_int( $arguments->key )
	) {
		return false;
	}

	return true;
}