[wp-trac] [WordPress Trac] #63268: PHPStan code quality improvements for 6.9
WordPress Trac
noreply at wordpress.org
Wed Apr 23 00:12:38 UTC 2025
#63268: PHPStan code quality improvements for 6.9
--------------------------+-------------------------------
Reporter: justlevine | Owner: SergeyBiryukov
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 6.9
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: coding-standards
--------------------------+-------------------------------
Comment (by SergeyBiryukov):
In [changeset:"60180" 60180]:
{{{
#!CommitTicketReference repository="" revision="60180"
Coding Standards: Explicitly return `null` in `wp_get_nav_menu_to_edit()`.
This commit updates the function to explicitly return `null` if a valid
`$menu_id` is not passed or the term does not exist. Previously, the
function could return `void`, but was typed as only returning a string or
a `WP_Error` object.
Follow-up to [14248].
Props justlevine.
See #63268.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63268#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list