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

Add rule forbidding more than one constant declared per statement #174

Merged
merged 1 commit into from
Apr 18, 2020

Conversation

carusogabriel
Copy link
Contributor

Although PSR only have this rule suggested to class properties, we
enforce it for constants as well.

Although PSR only have this rule suggested to class properties, we
enforce it for constants as well.
@carusogabriel carusogabriel added this to the 8.0.0 milestone Apr 18, 2020
@carusogabriel carusogabriel requested a review from a team as a code owner April 18, 2020 13:36
Comment on lines 14 to +17
public const BAZ = 456;

protected const PROPERTY_1 = '1';
protected const PROPERTY_2 = '2';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing between constants will be proposed in a separate PR.

Spoiler: SlevomatCodingStandard.Classes.ConstantSpacing.

@greg0ire greg0ire merged commit c665bae into master Apr 18, 2020
@greg0ire greg0ire deleted the new-rule/forbid-constants-same-declaration branch April 18, 2020 17:24
@greg0ire
Copy link
Member

Thanks @carusogabriel !

@greg0ire greg0ire self-assigned this Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants