[wp-trac] [WordPress Trac] #62561: Inaccurate PHPDoc Type for WP_Block_Parser_Frame::leading_html_start

WordPress Trac noreply at wordpress.org
Mon Nov 25 08:52:08 UTC 2024


#62561: Inaccurate PHPDoc Type for WP_Block_Parser_Frame::leading_html_start
-------------------------+------------------------------
 Reporter:  marian1      |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  trivial      |  Resolution:
 Keywords:  has-patch    |     Focuses:  docs
-------------------------+------------------------------

Comment (by hamzadev0000):

 The property WP_Block_Parser_Frame::leading_html_start is documented as an
 integer, but it can also be null. This happens because the constructor
 defines $leading_html_start as an optional parameter with a default value
 of null. If no integer is explicitly passed when creating the object, the
 property's value will remain null. To improve clarity, the documentation
 should reflect this and indicate that the property can be of type
 int|null.

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


More information about the wp-trac mailing list