[wp-trac] [WordPress Trac] #52539: callable typehint thows static analysis errors
WordPress Trac
noreply at wordpress.org
Wed Feb 17 09:34:56 UTC 2021
#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 dingo_d):
Great point on callables. I get that they are strings because they are
used in `call_user_func`, but there is another issue that I noticed, and
that is that in only a few places there is a check for `is_callable`. But
this would go above the scope of the current problem (documentation).
So for a second pass, would it just be enough to convert the empty strings
to `null` and remove the `string` type-hint from the documentation?
I'm a bit vary with variable name changes, as those could affect how WP
behaves on PHP8, with named arguments, no?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52539#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list