[wp-trac] [WordPress Trac] #52539: callable typehint thows static analysis errors

WordPress Trac noreply at wordpress.org
Wed Jun 26 20:11:15 UTC 2024


#52539: callable typehint thows static analysis errors
--------------------------+------------------------------
 Reporter:  dingo_d       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  docs
--------------------------+------------------------------

Comment (by bjorsch):

 I was about to file a ticket about this problem related to
 `add_menu_page()` and `add_submenu_page()`, but turned up this one in my
 preliminary search.

 We're running into the same problem while using Phan for static analysis,
 and we'd appreciate if callable parameters that also accept an `empty()`
 value to indicate no-callback were to be updated to be `callable|null`.

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


More information about the wp-trac mailing list