From b0a5d3d8b43acd4b0f356c6dcfdec6c8ebff1c08 Mon Sep 17 00:00:00 2001 From: David de Boer Date: Mon, 2 Sep 2024 20:20:52 +0200 Subject: [PATCH] Fix Psalm TooManyTemplateParams (#693) --- src/Factory.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/Factory.php b/src/Factory.php index 465f5e94..fdf33748 100644 --- a/src/Factory.php +++ b/src/Factory.php @@ -36,10 +36,8 @@ public function __construct() /** * @param Attributes $attributes - * - * @return static */ - final public static function new(array|callable $attributes = []): static // @phpstan-ignore return.phpDocType + final public static function new(array|callable $attributes = []): static { if (Configuration::isBooted()) { $factory = Configuration::instance()->factories->get(static::class); @@ -132,10 +130,8 @@ final public function sequence(iterable|callable $sequence): FactoryCollection /** * @param Attributes $attributes - * - * @return static */ - final public function with(array|callable $attributes = []): static // @phpstan-ignore return.phpDocType + final public function with(array|callable $attributes = []): static { $clone = clone $this; $clone->attributes[] = $attributes; @@ -176,12 +172,8 @@ final protected function normalizeAttributes(array|callable $attributes = []): a /** * Override to adjust default attributes & config. - * - * @return static - * - * @return static */ - protected function initialize(): static // @phpstan-ignore return.phpDocType + protected function initialize(): static { return $this; }