[wp-trac] [WordPress Trac] #64238: PHPStan code quality improvements for 7.0

WordPress Trac noreply at wordpress.org
Sat Mar 14 19:22:32 UTC 2026


#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:"62028" 62028]:
 {{{
 #!CommitTicketReference repository="" revision="62028"
 Cache API: Address code quality issues with `wp_cache_switch_to_blog()`.

 This addresses 3 PHPStan errors at rule level 8:

 * `arguments.count`: Function `wp_cache_switch_to_blog_fallback()` invoked
 with 1 parameter, 0 required.
 * `method.nonObject`: Cannot call method `switch_to_blog()` on `class-
 string|object`.
 * `missingType.return`: Function `wp_cache_switch_to_blog()` has no return
 type specified.

 Developed as subset of https://github.com/WordPress/wordpress-
 develop/pull/11151

 Follow-up to r61760.

 Props westonruter, johnjamesjacoby.
 See #23290, #64238.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64238#comment:114>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list