Skip to content

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.

6 participants