Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,8 @@ 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 use colons as shown in the sample code below.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `case` and `default` keywords MUST use colons as shown in the sample code below.
The `case` and `default` keywords MUST use colons.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer the existing language, so that it also applies to formatting of the colons (e.g. there shouldn't be whitespace between case and :).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there shouldn't be whitespace, that should be made explicit in the text. The code sample should demonstrate the intend of the text, not leave the reader to draw their own conclusions (which can be wildly different per person).


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


```php
<?php
Expand Down