Skip to content

Commit 877f798

Browse files
committed
Simplify internal codebase
1 parent 58287f6 commit 877f798

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/OuterList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public function replace(
361361
$member = self::filterMember($member);
362362

363363
return match (true) {
364-
$member->equals( $this->members[$offset]) => $this,
364+
$member->equals($this->members[$offset]) => $this,
365365
default => new self(...array_replace($this->members, [$offset => $member])),
366366
};
367367
}

src/Value.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,11 @@ public function equals(mixed $value): bool
257257
}
258258

259259
return match (true) {
260-
($this->value instanceof Bytes || $this->value instanceof Token || $this->value instanceof DisplayString) && $this->value->equals($value),
261-
$this->value instanceof DateTimeInterface && $value instanceof DateTimeInterface && $value == $this->value,
262-
$value === $this->value => true,
263-
default => false,
260+
$this->value instanceof Bytes,
261+
$this->value instanceof Token,
262+
$this->value instanceof DisplayString => $this->value->equals($value),
263+
$this->value instanceof DateTimeInterface && $value instanceof DateTimeInterface => $value == $this->value,
264+
default => $value === $this->value,
264265
};
265266
}
266267
}

0 commit comments

Comments
 (0)