[wp-trac] [WordPress Trac] #61399: HTML API: Add type annotations

WordPress Trac noreply at wordpress.org
Wed Jul 17 00:51:49 UTC 2024


#61399: HTML API: Add type annotations
--------------------------------------+-----------------------------
 Reporter:  jonsurrell                |       Owner:  jonsurrell
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  Future Release
Component:  HTML API                  |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------

Comment (by dmsnell):

 In [changeset:"58742" 58742]:
 {{{
 #!CommitTicketReference repository="" revision="58742"
 Fix phpdoc nullable types in some files.

 It was found that in several places in the HTML API and its supporting
 files,
 the wrong form of type annotation was used for optional parameters.

 Instead of using `?type`, this patch uses `type|type-of-default-value`
 instead,
 noting where important if the parameter is optional, and if so, what its
 default
 value is.

 Developed in https://github.com/WordPress/wordpress-develop/pull/7031
 Discussed in https://core.trac.wordpress.org/ticket/61399

 Props dmsnell, jonsurrell.
 See #61399.
 }}}

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


More information about the wp-trac mailing list