From fbcb492c79f68793ca4bfde7713faec8e5a55e05 Mon Sep 17 00:00:00 2001 From: luke Date: Thu, 24 Jun 2021 21:40:24 +0100 Subject: [PATCH] Simplification --- src/HigherOrderExpectation.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/HigherOrderExpectation.php b/src/HigherOrderExpectation.php index 4cb6fc49..e436da0c 100644 --- a/src/HigherOrderExpectation.php +++ b/src/HigherOrderExpectation.php @@ -66,11 +66,15 @@ final class HigherOrderExpectation /** * Creates a new expectation. * - * @param mixed $value + * @template TValue + * + * @param TValue $value + * + * @return Expectation */ - public function and($value): HigherOrderExpectation + public function and($value): Expectation { - return new self($this->expect($value), $value); + return $this->expect($value); } /**