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

Require constructor property promotion #7

Merged
merged 1 commit into from
Jun 18, 2022

Conversation

spaze
Copy link
Owner

@spaze spaze commented Jun 18, 2022

PHP 8.0+ feature so code targeting older PHPs would need to exclude it, just like trailing commas in calls for example.

This is how you'd exclude it, dear future me:

<rule ref="vendor/spaze/coding-standard/src/ruleset.xml">
	<exclude name="SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion"/>  <!-- 👈 this line -->
</rule>

PHP 8.0+ feature so code targeting older PHPs would need to exclude it, just like trailing commas in calls for example
@spaze spaze merged commit 3f227cb into main Jun 18, 2022
@spaze spaze deleted the spaze/constructor-property-promotion branch June 18, 2022 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant