Skip to content

Commit 15f65a2

Browse files
authored
Remove unnecessary cast to float
round() always returns a float
1 parent ccd5d63 commit 15f65a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Schema/Type/Number.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function validate(mixed $value, callable $fail): void
5454
// that has decimal places. (Since the modulo operator converts the multipleOf to int)
5555
if (
5656
$this->multipleOf !== null &&
57-
$value / $this->multipleOf !== (float) round($value / $this->multipleOf)
57+
$value / $this->multipleOf !== round($value / $this->multipleOf)
5858
) {
5959
$fail(sprintf('must be a multiple of %d', $this->multipleOf));
6060
}

0 commit comments

Comments
 (0)