Skip to content

Commit

Permalink
代码格式
Browse files Browse the repository at this point in the history
  • Loading branch information
Eno-CN committed Jul 20, 2024
1 parent 95d1778 commit dc87687
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Validate/ValidatorHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static function regex($value, string $rule): bool
*/
public static function decimal($value, ?float $min = null, ?float $max = null, ?int $accuracy = null): bool
{
return static::number($value, $min, $max, $accuracy) && (is_float($value) || str_contains((string) $value, '.'));
return static::number($value, $min, $max, $accuracy) && (\is_float($value) || str_contains((string) $value, '.'));
}

/**
Expand All @@ -39,7 +39,7 @@ public static function decimal($value, ?float $min = null, ?float $max = null, ?
public static function int($value, ?int $min = null, ?int $max = null): bool
{
// 整数验证
if ((string) (int) $value !== (string) $value || is_float($value))
if ((string) (int) $value !== (string) $value || \is_float($value))
{
return false;
}
Expand Down

0 comments on commit dc87687

Please sign in to comment.