SlevomatCodingStandard.Classes.RequireAbstractOrFinal
should exclude classes with @final
annotation
#1669
Labels
SlevomatCodingStandard.Classes.RequireAbstractOrFinal
should exclude classes with @final
annotation
#1669
I often exclude
src/Entity
from this sniff due to Doctrine entities being non-final classes. However, adding@final
annotation to these classes and includingcheckTooWideReturnTypesInProtectedAndPublicMethods
in PHPStan config allows us to detect mismatched return types in the class.It would be beneficial to modify this sniff to enforce classes to either have
abstract
orfinal
keywords or be annotated with@final
.The text was updated successfully, but these errors were encountered: