Skip to content

Add support for @no-named-arguments #5968

@MidnightDesign

Description

@MidnightDesign

It would be great if PHPStan added support for Psalm's @no-named-arguments.

Example use case: https://phpstan.org/r/65ac2b61-6af2-41b2-87b2-a611439210c3

class Test
{
	/** @var list<string> */
	private array $items;
	
	/**
	 * @no-named-arguments
	 */
	public function __construct(string ...$items): void
	{
		$this->items = $items;
	}
	
	/**
	 * @return list<string>
	 */
	public function getItems(): array {
		return $this->items;
	}
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions