Skip to content

Commit

Permalink
Fix Psalm TooManyTemplateParams (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeboer authored Sep 2, 2024
1 parent 3eebbf9 commit b0a5d3d
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ public function __construct()

/**
* @param Attributes $attributes
*
* @return static<T>
*/
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);
Expand Down Expand Up @@ -132,10 +130,8 @@ final public function sequence(iterable|callable $sequence): FactoryCollection

/**
* @param Attributes $attributes
*
* @return static<T>
*/
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;
Expand Down Expand Up @@ -176,12 +172,8 @@ final protected function normalizeAttributes(array|callable $attributes = []): a

/**
* Override to adjust default attributes & config.
*
* @return static
*
* @return static<T>
*/
protected function initialize(): static // @phpstan-ignore return.phpDocType
protected function initialize(): static
{
return $this;
}
Expand Down

0 comments on commit b0a5d3d

Please sign in to comment.