[wp-trac] [WordPress Trac] #48303: Docblock improvements for 5.4
WordPress Trac
noreply at wordpress.org
Tue Mar 17 04:02:52 UTC 2020
#48303: Docblock improvements for 5.4
----------------------------+---------------------
Reporter: desrosj | Owner: (none)
Type: task (blessed) | Status: closed
Priority: normal | Milestone: 5.4
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: | Focuses: docs
----------------------------+---------------------
Comment (by westonruter):
@SergeyBiryukov Just saw the changes here and I'm getting static analysis
warnings for code like:
{{{#!php
<?php
wp_scripts()->add_data(
$handle,
'foo_script_attributes',
[
'async' => true,
]
);
}}}
This [https://github.com/WordPress/wordpress-
develop/commit/ec83cd08eb6f9f8ce1246f5d1dd4940d03f923b9#diff-
a37b83a4acb4f422e0c3320ab32d69a1L233-R241 change] to
`WP_Dependencies::add_data()` in r47170 appears to not be correct:
{{{#!diff
- * @param mixed $value The data value.
+ * @param string $value The data value.
}}}
It has a mismatch with `wp_script_add_data()` which still indicates the
type of `$value` as being `mixed`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48303#comment:101>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list