Skip to content

PHPStan: should be contravariant with parameter #5677

Description

@Hanmac

Issue:
Methods defined in Parent with parent related type
are overwritten in Child with Child related type

Found solution, adding Template Params:
https://phpstan.org/r/b4926398-b0bf-400e-b053-e54c21d560bd

this may not be needed, depending on the function:

/**
  * @param AModel $model
  */

I will make extra issues/MRs for all the related ones.

List:

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions