[wp-trac] [WordPress Trac] #63268: PHPStan code quality improvements for 6.9
WordPress Trac
noreply at wordpress.org
Fri Apr 18 20:26:37 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:"60174" 60174]:
{{{
#!CommitTicketReference repository="" revision="60174"
Coding Standards: Correct `$site_id` parameter default values in
`WP_User`.
This commit corrects the default `$site_id` parameter values used
throughout the `WP_User` class to bring them in line with their `int`
doctypes (and the doctypes of the functions used internally by the
affected class methods).
More specifically,
* `__construct()`: `$site_id = ''` changed to `$site_id = 0`
* `init()`: `$site_id = ''` changed to `$site_id = 0`
* `for_blog()`: `$blog_id = ''` changed to `$blog_id = 0`
* `for_site()`: `$site_id = ''` changed to `$site_id = 0`
Follow-up to [12796], [15566], [18597], [41624].
Props justlevine.
See #63268.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63268#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list