[wp-trac] [WordPress Trac] #57099: Fix Test Class Header Tags

WordPress Trac noreply at wordpress.org
Mon Nov 14 13:12:51 UTC 2022


#57099: Fix Test Class Header Tags
--------------------------------------+-----------------------------
 Reporter:  wojtekn                   |       Owner:  SergeyBiryukov
     Type:  enhancement               |      Status:  accepted
 Priority:  normal                    |   Milestone:  6.2
Component:  Build/Test Tools          |     Version:
 Severity:  minor                     |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => accepted
 * component:  General => Build/Test Tools
 * milestone:  Awaiting Review => 6.2


Comment:

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

 It looks like the file-level DocBlock was created per the
 [https://developer.wordpress.org/coding-standards/inline-documentation-
 standards/php/#6-file-headers File Headers] section of the documentation
 standards:
 > The file header DocBlock is used to give an overview of what is
 contained in the file.
 >
 > Whenever possible, all WordPress files should contain a header DocBlock,
 regardless of the file’s contents – this includes files containing
 classes.

 Looking at the WordPress core, most class files do indeed contain both the
 file-level DocBlock and the class DocBlock.

 That said, I agree it makes less sense for unit test classes if not
 applied consistently, and the duplicate tags look a bit confusing.

 If we do want to merge these DocBlocks in unit tests,
 [attachment:"57099.diff"] includes a few more files where this can be
 applied.

 Related changesets: [43183], [43291], [43292], [43499], [43568], [44502],
 [44535], [44628], [44786], [44824], [44906], [44909], [46175].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57099#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list