From a3889110f12f077a642b1781c2dfb59e39fca70a Mon Sep 17 00:00:00 2001 From: danilopolani Date: Wed, 9 Mar 2022 11:48:35 +0100 Subject: [PATCH] fix phpstan types --- src/Factories/Attributes/Attribute.php | 12 ++++++++++++ src/Factories/TestCaseMethodFactory.php | 1 - 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Factories/Attributes/Attribute.php b/src/Factories/Attributes/Attribute.php index 22a08968..e53fbe13 100644 --- a/src/Factories/Attributes/Attribute.php +++ b/src/Factories/Attributes/Attribute.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace Pest\Factories\Attributes; +use Pest\Factories\TestCaseMethodFactory; + /** * @internal */ @@ -15,4 +17,14 @@ abstract class Attribute * @var bool */ public const ABOVE_CLASS = false; + + /** + * @param array $attributes + * + * @return array + */ + public function __invoke(TestCaseMethodFactory $method, array $attributes): array // @phpstan-ignore-line + { + return $attributes; + } } diff --git a/src/Factories/TestCaseMethodFactory.php b/src/Factories/TestCaseMethodFactory.php index 7830b693..effd525a 100644 --- a/src/Factories/TestCaseMethodFactory.php +++ b/src/Factories/TestCaseMethodFactory.php @@ -138,7 +138,6 @@ final class TestCaseMethodFactory } foreach ($attributesToUse as $attribute) { - /** @phpstan-ignore-next-line */ $attributes = (new $attribute())->__invoke($this, $attributes); }