Skip to content

Always @inheritdoc #2914

@iluuu1994

Description

@iluuu1994
class Foo {
	/** @return void */
	public function a() {}

	/** @return void */
	public function b() {}
}

class Bar extends Foo {
	/** Some comment */
	public function a() {}

	public function b() {}
}

https://phpstan.org/r/7058069c-167f-4cf4-9f27-f6b2e865dd7d

Method Bar::a() has no return typehint specified.

Psalm inherits the phpDoc types even if no @inheritdoc is specified. Every IDE does this. I think PHPStan should do the same. What do you think?

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