HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/coolswim/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Cast.php
<?php

namespace WPML\FP;

use WPML\Collect\Support\Traits\Macroable;

/**
 * @method static callable|bool toBool( mixed ...$v ) - Curried :: mixed->bool
 * @method static callable|int toInt( mixed ...$v ) - Curried :: mixed->int
 * @method static callable|string toStr( mixed ...$v ) - Curried :: mixed->string
 * @method static callable|array toArr( mixed ...$v ) - Curried :: mixed->array
 */
class Cast {
	use Macroable;

	public static function init() {
		self::macro( 'toBool', curryN( 1, function ( $v ) { return (bool) $v; } ) );
		self::macro( 'toInt', curryN( 1, function ( $v ) { return intval( $v ); } ) );
		self::macro( 'toStr', curryN( 1, function ( $v ) { return (string) $v; } ) );
		self::macro( 'toArr', curryN( 1, function ( $v ) { return (array) $v; } ) );
	}
}

Cast::init();