Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 7619714

Browse files
committed
chore: small ocd
1 parent c22e8c3 commit 7619714

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/Rule/Range.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,13 @@ public function assert(mixed $value, string $name): void
3232
);
3333
}
3434

35-
if (
36-
!Validator::greaterThan($this->minConstraint)
37-
->validate($this->maxConstraint)
38-
) {
35+
if (!Validator::greaterThan($this->minConstraint)->validate($this->maxConstraint)) {
3936
throw new UnexpectedValueException(
4037
'Max constraint value must be greater than min constraint value.'
4138
);
4239
}
4340

44-
if (
45-
!Validator::greaterThanOrEqual($this->minConstraint)
46-
->lessThanOrEqual($this->maxConstraint)
47-
->validate($value)
48-
) {
41+
if (!Validator::greaterThanOrEqual($this->minConstraint)->lessThanOrEqual($this->maxConstraint)->validate($value)) {
4942
throw new RangeException(
5043
message: $this->message,
5144
parameters: [

0 commit comments

Comments
 (0)