We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9877134 commit bfbff54Copy full SHA for bfbff54
src/Schema/Type/Number.php
@@ -52,7 +52,10 @@ public function validate(mixed $value, callable $fail): void
52
53
// Divide the value by multipleOf instead of using the modulo operator to avoid bugs when using a multipleOf
54
// that has decimal places. (Since the modulo operator converts the multipleOf to int)
55
- if ($this->multipleOf !== null && $value/$this->multipleOf !== (float) round($value/$this->multipleOf)) {
+ if (
56
+ $this->multipleOf !== null &&
57
+ $value / $this->multipleOf !== (float) round($value / $this->multipleOf)
58
+ ) {
59
$fail(sprintf('must be a multiple of %d', $this->multipleOf));
60
}
61
0 commit comments