Make WordPress Core

Opened 2 weeks ago

Closed 6 days ago

Last modified 6 days ago

#60513 closed defect (bug) (fixed)

trivial: using 'double asterisks (/**)' instead of 'single asterisk (/*)' for 'MockAction' class in 'tests/phpunit/includes/utils.php' looks better to me

Reported by: hztyfoon's profile hztyfoon Owned by: audrasjb's profile audrasjb
Milestone: 6.5 Priority: normal
Severity: trivial Version:
Component: Build/Test Tools Keywords: good-first-bug commit has-patch has-unit-tests
Focuses: docs, coding-standards Cc:

Description

Looks to me,
In here https://github.com/WordPress/wordpress-develop/blob/4fe09a2df/tests/phpunit/includes/utils.php#L52 for the code doc of 'MockAction' class instead of using single asterisk (/*) for the beginning of that code doc, we should use double asterisks (/**).

This will be consistent with other docs for class & also will be better for visibility/highlighting of the comment @since UT (3.7.0) in popular code editors like 'VS Code','PhpStorm' etc.

Change History (14)

#1 @audrasjb
2 weeks ago

  • Keywords good-first-bug needs-patch added
  • Version trunk deleted

Introduced in [47122].

Thanks for spotting this small issue.
Adding good-first-bug as it seems like an ideal ticket for first time contributors :)

This ticket was mentioned in PR #6132 on WordPress/wordpress-develop by mahnewr.


10 days ago
#2

  • Keywords has-patch has-unit-tests added; needs-patch removed

I changed one of the /* to a /** to follow proper PHPDoc comments syntax

Trac ticket: https://core.trac.wordpress.org/ticket/60513

#3 @kraftbj
10 days ago

  • Keywords commit added

#4 @audrasjb
10 days ago

  • Keywords has-unit-tests removed
  • Milestone changed from Awaiting Review to 6.5
  • Owner set to audrasjb
  • Status changed from new to accepted

Thanks for the PR @mahnewr! Self assigning for commit and moving to milestone 6.5.

#5 @rudlinkon
10 days ago

  • Keywords needs-patch added; has-patch removed

Thank you @hztyfoon for find out the issue. I think we can do the same fix for some places also. I have given two more places where we can apply the same fix.

https://github.com/WordPress/wordpress-develop/blob/4fe09a2df3a3cd8360228051955f66ebf1033374/tests/phpunit/includes/bootstrap.php#L59

https://github.com/WordPress/wordpress-develop/blob/4fe09a2df3a3cd8360228051955f66ebf1033374/tests/phpunit/includes/wp-profiler.php#L3

Also thanks for the PR @mahnewr I requested you to do the same fix for those places.

@kraftbj commented on PR #6132:


9 days ago
#7

I would not change the bootstrap.php since that appears to be a simple multi line comment (see 5.2 of https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/ )

The WP Profiler looks like it could function as the docblock for the class, so it should and have the additional check for completeness, like @ since, etc.

@mukesh27 commented on PR #6132:


9 days ago
#8

Ready for commit 🎉

@rudlinkon commented on PR #6132:


9 days ago
#9

I would not change the bootstrap.php since that appears to be a simple multi line comment (see 5.2 of https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/ )

The WP Profiler looks like it could function as the docblock for the class, so it should and have the additional check for completeness, like @ since, etc.

Thank you @kraftbj so we can add double asterisks on the wp-profiler.php file.

This ticket was mentioned in PR #6135 on WordPress/wordpress-develop by @rudlinkon.


9 days ago
#10

  • Keywords has-patch has-unit-tests added; needs-patch removed

This is an additional change of PR#6132

Trac ticket: https://core.trac.wordpress.org/ticket/60513

#11 @swissspidy
6 days ago

  • Component changed from General to Build/Test Tools

#12 @swissspidy
6 days ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 57665:

Build/Test Tools: Fix docblocks in a couple of test files to use two asterisks.

Props mahnewr, rudlinkon,kraftbj, audrasjb, mukesh27.
Fixes #60513.

Note: See TracTickets for help on using tickets.