for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Rico\Lib;
use Rico\Slib\ValidationUtils as StaticValidationUtils;
class ValidationUtils
{
/**
* Checks that $mixed value is an email.
*
* @param mixed $mixed
* @return bool
*/
public function isEmail($mixed): bool
return StaticValidationUtils::isEmail($mixed);
}
* Checks that $mixed value is a hexadecimal value.
public function isHexadecimal($mixed)
return StaticValidationUtils::isHexadecimal($mixed);
* Checks that $mixed value is an IP (v4 or v6).
public function isIp($mixed): bool
return StaticValidationUtils::isIp($mixed);
* Checks that $mixed value is a decimal number (float or integer).
public function isNumber($mixed): bool
return StaticValidationUtils::isNumber($mixed);
* Checks that $string value is a phone number.
* @param string $string
public function isPhoneNumber(string $string): bool
return StaticValidationUtils::isPhoneNumber($string);
* Checks that $mixed value is a positive integer (primary key).
public function isPositiveInt($mixed): bool
return StaticValidationUtils::isPositiveInt($mixed);
* Checks that $mixed value is an URL.
public function isURL($mixed): bool
return StaticValidationUtils::isURL($mixed);
* Checks that $mixed value is magnet URL.
public function isURLMagnet($mixed): bool
return StaticValidationUtils::isURLMagnet($mixed);