From f6126d9bfabfced22a64ca36878505e64a9c8d2d Mon Sep 17 00:00:00 2001 From: Ken Guest Date: Wed, 19 Nov 2025 17:38:58 +0000 Subject: [PATCH 1/2] switch case and default must not have semicolons --- spec.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec.md b/spec.md index 264ebe0..afc3d82 100644 --- a/spec.md +++ b/spec.md @@ -1093,6 +1093,9 @@ parentheses, spaces, and braces. The `case` statement MUST be indented once from `switch`, and the `break` keyword (or other terminating keywords) MUST be indented at the same level as the `case` body. There MUST be a comment such as `// no break` when fall-through is intentional in a non-empty `case` body. +The `case` and `default` keywords MUST NOT utilise semi-colons e.g. (`default;`), +colons MUST be used as shown in the sample code below. + ```php Date: Wed, 26 Nov 2025 20:40:45 +0000 Subject: [PATCH 2/2] Reword section about colon usage in switch statement --- spec.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec.md b/spec.md index afc3d82..9aa353f 100644 --- a/spec.md +++ b/spec.md @@ -1093,8 +1093,7 @@ parentheses, spaces, and braces. The `case` statement MUST be indented once from `switch`, and the `break` keyword (or other terminating keywords) MUST be indented at the same level as the `case` body. There MUST be a comment such as `// no break` when fall-through is intentional in a non-empty `case` body. -The `case` and `default` keywords MUST NOT utilise semi-colons e.g. (`default;`), -colons MUST be used as shown in the sample code below. +The `case` and `default` keywords MUST use colons as shown in the sample code below. ```php