-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
I was just experimenting with migrating a project from PHPStan level 9 to 10, and found a lot of instances of mixed types. I thought I'd open a tracking issue to figure out if and how those could be improved, either in phpstan-wordpress or (preferably) wordpress-stubs:
-
get_registered_settings(): document the shape of the returned settings (seeregister_setting()) -
WP_Taxonomy::$labels: define object shape with expected keys (seeget_taxonomy_labels()) -
WP_Post_Type::$labels: define object shape with expected keys (seeget_post_type_labels()) -
WP_Taxonomy::$cap: define object shape with expected keys -
WP_Post_Type::$cap: define object shape with expected keys (seeget_post_type_capabilities()) -
WP_User::$caps: define asarray<string, bool> -
wp_parse_args(): could an extension be built to dynamically set the return type based on the shape of the arguments?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels