From 3589f3d5e7daf4b339cf37f7dafe0820a913df5d Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Sat, 13 Mar 2021 11:06:34 +0000 Subject: [PATCH] chore: fixes test suite --- phpstan.neon | 1 - src/Factories/TestCaseFactory.php | 1 + src/Support/ChainableClosure.php | 2 ++ src/Support/Container.php | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/phpstan.neon b/phpstan.neon index 8861607d..e3019e7d 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -14,7 +14,6 @@ parameters: ignoreErrors: - "#type mixed is not subtype of native#" - - "#Undefined variable: \\$this#" - "#is not allowed to extend#" - "#Language construct eval#" - "# with null as default value#" diff --git a/src/Factories/TestCaseFactory.php b/src/Factories/TestCaseFactory.php index 4d628e5a..ddba1083 100644 --- a/src/Factories/TestCaseFactory.php +++ b/src/Factories/TestCaseFactory.php @@ -142,6 +142,7 @@ final class TestCaseFactory $proxies->proxy($this); $chains->chain($this); + /* @phpstan-ignore-next-line */ return call_user_func(Closure::bind($factoryTest, $this, get_class($this)), ...func_get_args()); }; diff --git a/src/Support/ChainableClosure.php b/src/Support/ChainableClosure.php index 0a40fae8..fea5533b 100644 --- a/src/Support/ChainableClosure.php +++ b/src/Support/ChainableClosure.php @@ -17,7 +17,9 @@ final class ChainableClosure public static function from(Closure $closure, Closure $next): Closure { return function () use ($closure, $next): void { + /* @phpstan-ignore-next-line */ call_user_func_array(Closure::bind($closure, $this, get_class($this)), func_get_args()); + /* @phpstan-ignore-next-line */ call_user_func_array(Closure::bind($next, $this, get_class($this)), func_get_args()); }; } diff --git a/src/Support/Container.php b/src/Support/Container.php index 42175289..7685472f 100644 --- a/src/Support/Container.php +++ b/src/Support/Container.php @@ -79,6 +79,7 @@ final class Container if ($candidate === null) { $type = $param->getType(); + /* @phpstan-ignore-next-line */ if ($type !== null && $type->isBuiltin()) { $candidate = $param->getName(); } else {