Nearly every switch
statement in Drupal core uses the standard syntax of case
followed by a colon. However, there are 14 instances where a case statement uses the alternate syntax of a semicolon instead of a colon. It seems that these were unintentional typos, since they are randomly mixed in with case statements using the standard syntax.
Moreover using semicolon is deprecated in PHP 8.5
Consistently use the standard switch case syntax.
backport
- fixes
📌
Inconsistent switch case syntax
Downport
- sniffer
#2901831: Only use colons in case statements →
Active
10.6 ✨
base system
It involves compliance with, or the content of coding standards. Requires broad community agreement.