Skip to content

Clarification on section 2.6 trailing commas #106

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

Closed
aurimasbutkus opened this issue Nov 15, 2024 · 1 comment
Closed

Clarification on section 2.6 trailing commas #106

aurimasbutkus opened this issue Nov 15, 2024 · 1 comment

Comments

@aurimasbutkus
Copy link

Hello!

I am working on a PHPCS ruleset based on this standard and need some clarification to be sure I am implementing it all correctly.

The section 2.6 states Numerous PHP constructs.
Does this include all of the currently available constructs or only the ones specifically listed in the examples?
If any new such constructs are added in the future to PHP, does this section automatically apply to them?
Do you have a definitive list of constructs that this covers?

Thanks in advance!

@samdark
Copy link
Member

samdark commented Nov 16, 2024

Does this include all of the currently available constructs or only the ones specifically listed in the examples?

As a rule, examples are only examples in all the PSR/PER. These are not rules or constraints. You should pay attention to what's written in text.

So the answer is "all of the currently available constructs".

If any new such constructs are added in the future to PHP, does this section automatically apply to them?

Yes.

Do you have a definitive list of constructs that this covers?

No.

@samdark samdark closed this as completed Nov 16, 2024
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

No branches or pull requests

2 participants