Skip to content

Commit

Permalink
Corrections to PHPStan-specific tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Aug 11, 2022
1 parent 8b0f3e0 commit bdbf8b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/WP_Block_Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ class WP_Block_Type extends Shared\Base {
/**
* Block type render callback.
*
* @var callable(array<string, mixed>, string): string
* @var callable
* @phpstan-var callable(array<string, mixed>, string): string
*/
public $render_callback;

Expand Down
6 changes: 3 additions & 3 deletions src/register_taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ class register_taxonomy extends Shared\Base {
* Provide a callback function for the meta box display. If not set, `post_categories_meta_box()` is used for hierarchical taxonomies, and `post_tags_meta_box()` is used for non-hierarchical. If false, no meta box is shown.
*
* @var false|callable
* @phpstan-var false|callable(\WP_Post,mixed[]) : void
* @phpstan-var false|callable(\WP_Post,mixed[]): void
*/
public $meta_box_cb;

/**
* Callback function for sanitizing taxonomy data saved from a meta box. If no callback is defined, an appropriate one is determined based on the value of `$meta_box_cb`.
*
* @var callable
* @phpstan-var callable(string,mixed) : (int|string)[]
* @phpstan-var callable(string,mixed): (int|string)[]
*/
public $meta_box_sanitize_cb;

Expand Down Expand Up @@ -166,7 +166,7 @@ class register_taxonomy extends Shared\Base {
* Default `_update_generic_term_count()` for taxonomies attached to other object types, such as users.
*
* @var callable
* @phpstan-var callable(int[],\WP_Taxonomy) : void
* @phpstan-var callable(int[],\WP_Taxonomy): void
*/
public $update_count_callback;

Expand Down
2 changes: 1 addition & 1 deletion src/wp_nav_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class wp_nav_menu extends Shared\Base {
* Default is 'wp_page_menu'. Set to false for no fallback.
*
* @var callable|false
* @phpstan-var (callable(mixed[]):(string|void))|false
* @phpstan-var (callable(mixed[]): (string|void))|false
*/
public $fallback_cb;

Expand Down

0 comments on commit bdbf8b2

Please sign in to comment.