[wp-trac] [WordPress Trac] #52217: Fix code issues identified by PHPStan
WordPress Trac
noreply at wordpress.org
Mon Nov 4 15:23:42 UTC 2024
#52217: Fix code issues identified by PHPStan
-------------------------+-------------------------------
Reporter: johnbillion | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: coding-standards
-------------------------+-------------------------------
Comment (by SergeyBiryukov):
In [changeset:"59340" 59340]:
{{{
#!CommitTicketReference repository="" revision="59340"
Coding Standards: Use explicit returns in
`WP_Site_Health_Auto_Updates::test_*()`.
This commit corrects several instances of `test_*()` methods potentially
returning `void` instead of their documented return types.
Since these methods are public, `null` is used to represent a passed test
for backward compatibility with the coercion of the previously-returned
`void`. Previous usage of `false` is preserved.
Includes updating some `@return` tags for clarity.
Follow-up to [44986], [46276], [49927].
Props justlevine, apermo, SergeyBiryukov.
See #52217.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52217#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list