Skip to content

enumerations.xml Amend the CS of the code examples#4088

Merged
jordikroon merged 5 commits into
php:masterfrom
mmalferov:patch-996250
Jun 5, 2026
Merged

enumerations.xml Amend the CS of the code examples#4088
jordikroon merged 5 commits into
php:masterfrom
mmalferov:patch-996250

Conversation

@mmalferov
Copy link
Copy Markdown
Member

No description provided.

Comment thread language/enumerations.xml
@tiffany-taylor
Copy link
Copy Markdown
Member

Changes in this PR are made to the pages in this section: https://www.php.net/manual/en/language.enumerations.php

I was guided by the reader and how convenient it would be for the user to read the example. I'm going back to the previous formatting, since it violates the tradition :)
@vrana
Copy link
Copy Markdown
Contributor

vrana commented Apr 24, 2025

I see no point in adding newlines before ?>.

@Crell
Copy link
Copy Markdown
Contributor

Crell commented Oct 3, 2025

Please remove the newlines before ?>, as we don't need those, and rebase the PR. We should be able to merge it then. Thanks.

@jordikroon
Copy link
Copy Markdown
Member

jordikroon commented May 10, 2026

The conflicts in this PR (#5479) are caused by a recent revision that enabled WASM for examples. So it would need another rebase..

I don't think changing code styles for examples on it's own gives any benefits the docs. The docs don't follow any code style guidelines other than it should be understandable for a developer.

Adding whitespaces or newlines don't really give any reasonable benefits to this. For that reason I don't see any valid reason to make this change.

@tiffany-taylor / @Crell any thoughts on this?

@Crell
Copy link
Copy Markdown
Contributor

Crell commented May 10, 2026

Ideally code blocks should follow PER-CS, though the degree to which it's worth it to apply those to pre-existing code blocks is debatable. (The whole docs is very inconsistent on just about everything, as many people reject the idea of updating it to current conventions for fear of making more noise for translators.)

@jordikroon
Copy link
Copy Markdown
Member

Ideally code blocks should follow PER-CS, though the degree to which it's worth it to apply those to pre-existing code blocks is debatable.

Ah I see, it is in fact explicitly written in the style docs. Though I have seen differences in opinion. I prefer to do the simpara principle. So only updating examples when these blocks are touched. Or do it file based if an alteration of these documentation files is required.

Anyway, since it's a relatively small change I have no objections to merge this.

Still need to do a rebase I'm afraid.

@jordikroon jordikroon merged commit 4c158f4 into php:master Jun 5, 2026
2 checks passed
@mmalferov mmalferov deleted the patch-996250 branch June 5, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants