Files
kiri-validator/IntegerValidator.php
T

28 lines
391 B
PHP
Raw Normal View History

2022-01-09 14:01:11 +08:00
<?php
/**
* Created by PhpStorm.
* User: whwyy
* Date: 2018/4/4 0004
* Time: 18:44
*/
declare(strict_types=1);
namespace validator;
2023-10-24 17:22:29 +08:00
/**
*
*/
2022-01-09 14:01:11 +08:00
class IntegerValidator extends BaseValidator
{
2023-07-07 17:24:03 +08:00
/**
2023-12-18 15:01:09 +08:00
* @param float $value
2023-07-07 17:24:03 +08:00
* @return bool
*/
2023-12-19 14:51:13 +08:00
public function trigger(mixed $value): bool
2023-12-18 15:01:09 +08:00
{
return (float)$value == $value;
}
2022-01-09 14:01:11 +08:00
}