Make WordPress Core

Opened 6 months ago

Last modified 5 days ago

#59934 new enhancement

Twenty Twenty-Four: PHPCS: Empty line required before block comment

Reported by: pratikharadava's profile pratikharadava Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.4
Component: Bundled Theme Keywords: has-patch 2nd-opinion
Focuses: docs, coding-standards Cc:


I have fixed Empty line required before block the comment PHPCS issue on the twenty-twentyfour theme's function file.

Attachments (2)

functions.php (5.6 KB) - added by pratikharadava 6 months ago.
59934.diff (3.6 KB) - added by sabernhardt 6 months ago.
moving the comments before register_block_style

Download all attachments as: .zip

Change History (6)

#1 @SergeyBiryukov
6 months ago

  • Component changed from Themes to Bundled Theme
  • Summary changed from PHPCS : Empty line required before block comment to Twenty Twenty-Four: PHPCS: Empty line required before block comment

Hi there, welcome to WordPress Trac! Thanks for the ticket.

Could you clarify how you run the PHPCS checks?

When running WPCS checks for WordPress core with the default phpcs.xml.dist file, Twenty Twenty-Four appears to pass all the checks successfully in my testing.

6 months ago

moving the comments before register_block_style

#2 @sabernhardt
6 months ago

  • Focuses docs added
  • Keywords 2nd-opinion added
  • Version changed from trunk to 6.4

I did not find a spacing requirement before comments in the handbook.

Twenty Twenty-One added comments before each register_block_style function, though those arrays do not include inline_style. If it's worth moving the comments earlier in Twenty Twenty-Four, I found some related issues and pull requests to fill in the rest of the comments (and adjusted the quotes).

#3 @karmatosed
5 days ago

I am torn working out if this is worth it, although I do recognize we have a patch. @SergeyBiryukov you are saying we pass the checks. Does that mean we don't need to have this diff, or @sabernhardt would it be good to get in as a refinement? I am happy either way but want to just make sure we have a consensus on this.

#4 @sabernhardt
5 days ago

I do not find the changes necessary, but the ticket type is 'enhancement'. It might be nicer with them.

Note: See TracTickets for help on using tickets.