crazyfactory / crazyfactory/php-sniffs
fix: switch statement bracketing
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
The rule:
ERROR | [x] Newline required after closing brace
Forces this switch statement to:
switch ($categoryKey) {
case 'scarfs':
return static::get('scarfs');
case 'Piercing Tools':
return static::get('tools');
case 'Tattoos':
case 'Liptattoos':
case 'Stickers':
return static::get('stickers');
case 'mobile_phone_cases':
return static::get('plastic');
case 'care':
return static::get('care');
}
; // linting does this
Contributor guide
No contributing guide indexed for this repository
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 by locating the rule that reports “Newline required after closing brace” and the checks covering switch statements. Reproduce the shown PHP example, then update the relevant behavior so the reported bracketing result matches the intended style and verify it with the rule’s tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100