wearerequired / wearerequired/coding-standards
PHP: Require or disallow trailing comma in functions
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 12
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Option 1:
sprintf(
'Foo %s',
'bar',
);
Sniffs:
SlevomatCodingStandard.Functions.RequireTrailingCommaInCall
SlevomatCodingStandard.Functions.RequireTrailingCommaInClosureUse
SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration
Option 2:
sprintf(
'Foo %s',
'bar'
);
Sniffs:
SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall
SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse
SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration
Related: https://php.watch/versions/8.0/trailing-comma-parameter-use-list
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked RequireTrailingComma and DisallowTrailingComma sniffs, then read the related PHP 8.0 trailing-comma note. The issue names no repository files or tests; done means choosing one policy and covering calls, closure use lists, and declarations consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100