Closed (duplicate)
Project:
Coder
Version:
8.3.x-dev
Component:
Review/Rules
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2025 at 03:52 UTC
Updated:
4 May 2025 at 16:58 UTC
Jump to comment: Most recent
The Coding standards project agreed to enforce a colon for the case statement.
#2999367: Require using a colon after case instruction in switch statements
Add a sniff
Review
Comments
Comment #2
jonathan1055 commentedA sniff and fixer for this has been written and it is part of PHP-CS-FIXER but I don't think this is currently loaded and available in Coder. What is the policy regarding installing new requirements vs writing our own sniffs?
Comment #3
klausiPHP-CS-Fixer is a different system than PHPCS. Coder uses PHPCS sniffs.
Integrating or running PHP-CS-Fixer is a bit out of scope for this Coder issue, but I'm open to review approaches how we could leverage PHP-CS-Fixer as parallel system to PHPCS in Coder.
Comment #4
klausiDuplicate of #3487111: Enforce case statements ending in a : instead of a ;.
Comment #5
jonathan1055 commentedI have updated #2999367: Require using a colon after case instruction in switch statements with a link to that original issue, and the fact that Coder 8.3.27 (which contains this sniff) was released on 8 Jan 2025.