Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classes with Abstract prefix should be abstract #28

Open
OndraM opened this issue Jan 18, 2019 · 1 comment
Open

Classes with Abstract prefix should be abstract #28

OndraM opened this issue Jan 18, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@OndraM
Copy link
Member

OndraM commented Jan 18, 2019

Thanks to great https://github.com/Symplify/CodingStandard#abstract-class-should-have-prefix-abstract we check whether classes declared abstract do have Abstract prefix. But it could be nice to check also the "opposite way", ie. the classes starting with Abstract are in fact declared as abstract.

// @TomasVotruba didn't you heard of such fixer? Maybe it already exists somewhere 🤔?

@OndraM OndraM added the enhancement New feature or request label Jan 18, 2019
@TomasVotruba
Copy link

I see. AFAIK such rule doesn't exists in sniff/fixer.

It should be rather sniff, right? So this code is not broken:

 <?php

-class AbstractClass
+abstract class AbstractClass
 {
 } 

 new AbstractClass;

Do you plan something similar verification for *Interface or *Trait naming?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants