From 6e7890c206acf2ae79095d9f007780eaa3210033 Mon Sep 17 00:00:00 2001 From: Fabio Ivona Date: Mon, 29 Nov 2021 09:58:48 +0100 Subject: [PATCH] fix phpstan --- src/Expectation.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Expectation.php b/src/Expectation.php index 42acbd9d..7dd13fb2 100644 --- a/src/Expectation.php +++ b/src/Expectation.php @@ -22,7 +22,7 @@ use PHPUnit\Framework\ExpectationFailedException; * @property Expectation $not Creates the opposite expectation. * @property Each $each Creates an expectation on each element on the traversable value. * - * @mixin CoreExpectation + * @mixin CoreExpectation */ final class Expectation { @@ -30,6 +30,7 @@ final class Expectation __call as __extendsCall; } + /** @var CoreExpectation */ private CoreExpectation $coreExpectation; /** @@ -260,6 +261,8 @@ final class Expectation * creates a new higher order expectation. * * @param array $parameters + * + * @return Expectation|HigherOrderExpectation */ public function __call(string $method, array $parameters): Expectation|HigherOrderExpectation { @@ -311,7 +314,7 @@ final class Expectation * Dynamically calls methods on the class without any arguments * or creates a new higher order expectation. * - * @return Expectation|OppositeExpectation|Each|HigherOrderExpectation|TValue + * @return Expectation|OppositeExpectation|Each|HigherOrderExpectation|TValue */ public function __get(string $name) { @@ -320,6 +323,7 @@ final class Expectation } if (!method_exists($this, $name) && !method_exists($this->coreExpectation, $name) && !Expectation::hasExtend($name)) { + /* @phpstan-ignore-next-line */ return new HigherOrderExpectation($this, $this->retrieve($name, $this->value)); }