[wp-trac] [WordPress Trac] #64238: PHPStan code quality improvements for 7.0
WordPress Trac
noreply at wordpress.org
Tue Nov 25 01:58:30 UTC 2025
#64238: PHPStan code quality improvements for 7.0
--------------------------------------+-------------------------------
Reporter: SergeyBiryukov | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 7.0
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: coding-standards
--------------------------------------+-------------------------------
Comment (by westonruter):
In [changeset:"61299" 61299]:
{{{
#!CommitTicketReference repository="" revision="61299"
Docs: Update various class `@var` tags to indicate nullability.
This updates various `@var` tags on class properties to correctly indicate
that the props may be `null` or unset:
* `WP_Dependencies::$all_queued_deps` is nullable by both `::enqueue()`
and `::dequeue`. Also, the types of the keys and values are specified.
* `WP_Duotone::$global_styles_presets` and `::$global_styles_block_names`
start off unset and are only initialized by static classes.
* `WP_Query::init()` and `WP_Rewrite::init()` are public methods that
`unset()`s many class props.
* `WP_Theme::cache_delete()` sets many props to `null`.
Developed in https://github.com/WordPress/wordpress-develop/pull/8953
Props justlevine, westonruter.
See #64238, #64224.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64238#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list