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

WordPress Trac noreply at wordpress.org
Tue Nov 25 01:32:56 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:"61298" 61298]:
 {{{
 #!CommitTicketReference repository="" revision="61298"
 Docs: Update typing for `wp_create_category()`.

 * Ensure that `wp_create_category()` returns `int` as opposed to `numeric-
 string`.
 * Rename `$cat_name` to `$category_name` to avoid abbreviating variables.
 * Update docblock to remove erroneous `int` for `$category_name` param
 when only `string` is intended.
 * Add missing tests for `wp_create_category()`.

 Developed in https://github.com/WordPress/wordpress-develop/pull/8861

 Props justlevine, westonruter.
 See #64238, #64226.
 }}}

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


More information about the wp-trac mailing list