diff --git a/src/Expectation.php b/src/Expectation.php index f98638f7..8dc287a0 100644 --- a/src/Expectation.php +++ b/src/Expectation.php @@ -56,7 +56,7 @@ final class Expectation */ public function and(mixed $value): Expectation { - return new self($value); + return $value instanceof static ? $value : new self($value); } /**