Skip to content

PHP 8.0 | FunctionDeclarations/NewTrailingComma: add XML documentation#2016

Merged
jrfnl merged 3 commits intoPHPCompatibility:developfrom
okkun-sh:docs-FunctionDeclarations/NewTrailingComma
Dec 3, 2025
Merged

PHP 8.0 | FunctionDeclarations/NewTrailingComma: add XML documentation#2016
jrfnl merged 3 commits intoPHPCompatibility:developfrom
okkun-sh:docs-FunctionDeclarations/NewTrailingComma

Conversation

@okkun-sh
Copy link
Copy Markdown
Contributor

@okkun-sh okkun-sh commented Dec 1, 2025

Summary

Add XML documentation for the FunctionDeclarations/NewTrailingComma sniff.

This contributes to #1285.

Whenever you have time, thanks!

Copy link
Copy Markdown
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

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

@okkun-sh Thanks for the PR!

Unfortunately, the line with the closure as it is now, is too long, which means it breaks the table format on the command-line:
image

As a rule of thumb (also noted in the meta documentation ticket):

Each line within the code sample should be max 48 characters as otherwise the display on the command-line can be off.

Could you please reformat the code in a way that the example still has the same value, but doesn't break the table ?

@okkun-sh
Copy link
Copy Markdown
Contributor Author

okkun-sh commented Dec 2, 2025

@jrfnl
Sorry for missing that. Fixed!

@okkun-sh okkun-sh requested a review from jrfnl December 2, 2025 14:54
Copy link
Copy Markdown
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

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

@jrfnl Sorry for missing that. Fixed!

@okkun-sh Thanks for fixing that, but the code sample is now unrealistic as it is a callable which can't be called (as not assigned to a variable, nor passed as a callable to a function).

I've left a suggestion inline for you to consider, but feel free to vary.

Co-authored-by: Juliette <663378+jrfnl@users.noreply.github.com>
@okkun-sh
Copy link
Copy Markdown
Contributor Author

okkun-sh commented Dec 3, 2025

@jrfnl
I've applied the suggestions!
Thanks for the feedback as always!

@okkun-sh okkun-sh requested a review from jrfnl December 3, 2025 15:04
@jrfnl jrfnl added this to the 10.0.0-alpha3 milestone Dec 3, 2025
Copy link
Copy Markdown
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

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

Thanks again for this PR @okkun-sh ! All good from me.

@jrfnl jrfnl merged commit adc6bc4 into PHPCompatibility:develop Dec 3, 2025
37 checks passed
@okkun-sh okkun-sh deleted the docs-FunctionDeclarations/NewTrailingComma branch December 7, 2025 15:08
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.

2 participants