Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f379ff7
Code Quality: Correct the type of `Walker::$tree_type`.
mukeshpanchal27 Nov 26, 2026
446c0d7
Code Quality: Document `WP_Block::$inner_blocks` as possibly empty.
mukeshpanchal27 Nov 26, 2026
a04b85c
Code Quality: Default `WP_Term::$term_group` to `0`.
mukeshpanchal27 Nov 26, 2026
6d982a7
Code Quality: Document the query containers of `WP_Query` as possibly…
mukeshpanchal27 Nov 26, 2026
d95e244
Code Quality: Document the query containers of `WP_Comment_Query` as …
mukeshpanchal27 Nov 26, 2026
888cbe6
Code Quality: Document the query containers of `WP_Site_Query` as pos…
mukeshpanchal27 Nov 26, 2026
d37a8e8
Code Quality: Document `WP_Term_Query::$meta_query` as possibly false.
mukeshpanchal27 Nov 26, 2026
1dc9822
Code Quality: Document `WP_User_Query::$meta_query` as possibly false.
mukeshpanchal27 Nov 26, 2026
a153931
Code Quality: Correct the type of `WP_Customize_Panel::$theme_supports`.
mukeshpanchal27 Nov 26, 2026
d4746f4
Code Quality: Document the default of `WP_Customize_Control::$active_…
mukeshpanchal27 Nov 26, 2026
f90b9c5
Code Quality: Document the default of `WP_Customize_Panel::$active_ca…
mukeshpanchal27 Nov 26, 2026
77e85fc
Code Quality: Document the default of `WP_Customize_Section::$active_…
mukeshpanchal27 Nov 26, 2026
43264a6
Code Quality: Document the default of the `WP_Customize_Setting` call…
mukeshpanchal27 Nov 26, 2026
0d0c005
Tests: Cover the default of `WP_Term::$term_group`.
mukeshpanchal27 Nov 26, 2026
ac9933b
Merge branch 'trunk' into fix/property-default-value-baseline
mukeshpanchal27 Nov 27, 2026
0b52d8f
Docs: Clarify when the `$date_query` containers are false.
mukeshpanchal27 Nov 27, 2026
46c78bb
Code Quality: Document `Walker_Nav_Menu::$tree_type` as a list of non…
mukeshpanchal27 Nov 28, 2026
29d12b6
Code Quality: Move the empty array shape of `WP_Block::$inner_blocks`…
mukeshpanchal27 Nov 28, 2026
6f01b63
Code Quality: Type the `$active_callback` of Customizer controls, pan…
mukeshpanchal27 Nov 28, 2026
e375647
Code Quality: Type the callbacks of `WP_Customize_Setting`.
mukeshpanchal27 Nov 28, 2026
0afbb43
Merge branch 'trunk' into fix/property-default-value-baseline
mukeshpanchal27 Nov 28, 2026
22dbdb5
Merge branch 'trunk' into fix/property-default-value-baseline
mukeshpanchal27 Nov 30, 2026
f733b67
Tests: Type the keys of the `WP_Term::$term_group` data provider as n…
mukeshpanchal27 Nov 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/wp-includes/class-walker-nav-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class Walker_Nav_Menu extends Walker {
* What the class handles.
*
* @since 3.0.0
* @var string
* @var string[]
Comment thread
mukeshpanchal27 marked this conversation as resolved.
Resolved
* @phpstan-var list<non-empty-string>
*
* @see Walker::$tree_type
*/
Expand Down
5 changes: 4 additions & 1 deletion src/wp-includes/class-wp-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ class WP_Block {
/**
* List of inner blocks (of this same class)
*
* This is an empty array when the block has no inner blocks.
*
* @since 5.5.0
* @var WP_Block_List
* @var WP_Block_List|array
* @phpstan-var WP_Block_List|array{}
*/
public $inner_blocks = array();

Expand Down
8 changes: 6 additions & 2 deletions src/wp-includes/class-wp-comment-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ class WP_Comment_Query {
/**
* Metadata query container
*
* This is false until the query is run.
*
* @since 3.5.0
* @var WP_Meta_Query A meta query instance.
* @var WP_Meta_Query|false A meta query instance.
*/
public $meta_query = false;

Expand Down Expand Up @@ -69,8 +71,10 @@ class WP_Comment_Query {
/**
* Date query container
*
* This is false until a query with a `date_query` argument runs.
*
* @since 3.7.0
* @var WP_Date_Query A date query instance.
* @var WP_Date_Query|false A date query instance.
*/
public $date_query = false;

Expand Down
12 changes: 8 additions & 4 deletions src/wp-includes/class-wp-customize-control.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,18 @@ class WP_Customize_Control {
/**
* Callback.
*
* This is an empty string by default, which the constructor replaces with
* {@see WP_Customize_Control::active_callback()}.
*
* @since 4.0.0
*
* @see WP_Customize_Control::active()
*
* @var callable Callback is called with one argument, the instance of
* WP_Customize_Control, and returns bool to indicate whether
* the control is active (such as it relates to the URL
* currently being previewed).
* @var callable|string Callback is called with one argument, the instance of
* {@see WP_Customize_Control}, and returns bool to indicate whether
* the control is active (such as it relates to the URL
* currently being previewed).
* @phpstan-var (callable( WP_Customize_Control ): bool)|''
*/
public $active_callback = '';

Expand Down
18 changes: 11 additions & 7 deletions src/wp-includes/class-wp-customize-panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class WP_Customize_Panel {
* Theme features required to support the panel.
*
* @since 4.0.0
* @var mixed[]
* @var string|string[]
*/
public $theme_supports = '';

Expand Down Expand Up @@ -125,14 +125,18 @@ class WP_Customize_Panel {
/**
* Active callback.
*
* This is an empty string by default, which the constructor replaces with
* {@see WP_Customize_Panel::active_callback()}.
*
* @since 4.1.0
*
* @see WP_Customize_Section::active()
* @see WP_Customize_Panel::active()
*
* @var callable Callback is called with one argument, the instance of
* WP_Customize_Section, and returns bool to indicate whether
* the section is active (such as it relates to the URL currently
* being previewed).
* @var callable|string Callback is called with one argument, the instance of
* {@see WP_Customize_Panel}, and returns bool to indicate whether
* the panel is active (such as it relates to the URL currently
* being previewed).
* @phpstan-var (callable( WP_Customize_Panel ): bool)|''
*/
public $active_callback = '';

Expand All @@ -152,7 +156,7 @@ class WP_Customize_Panel {
* of panels and sections. Default 160.
* @type string $capability Capability required for the panel.
* Default `edit_theme_options`.
* @type mixed[] $theme_supports Theme features required to support the panel.
* @type string|string[] $theme_supports Theme features required to support the panel.
* @type string $title Title of the panel to show in UI.
* @type string $description Description to show in the UI.
* @type string $type Type of the panel.
Expand Down
12 changes: 8 additions & 4 deletions src/wp-includes/class-wp-customize-section.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,18 @@ class WP_Customize_Section {
/**
* Active callback.
*
* This is an empty string by default, which the constructor replaces with
* {@see WP_Customize_Section::active_callback()}.
*
* @since 4.1.0
*
* @see WP_Customize_Section::active()
*
* @var callable Callback is called with one argument, the instance of
* WP_Customize_Section, and returns bool to indicate whether
* the section is active (such as it relates to the URL currently
* being previewed).
* @var callable|string Callback is called with one argument, the instance of
* {@see WP_Customize_Section}, and returns bool to indicate whether
* the section is active (such as it relates to the URL currently
* being previewed).
* @phpstan-var (callable( WP_Customize_Section ): bool)|''
*/
public $active_callback = '';

Expand Down
15 changes: 12 additions & 3 deletions src/wp-includes/class-wp-customize-setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,33 @@ class WP_Customize_Setting {
/**
* Server-side validation callback for the setting's value.
*
* An empty string means there is no callback.
*
* @since 4.6.0
* @var callable
* @var callable|string
* @phpstan-var (callable( WP_Error, mixed, WP_Customize_Setting ): mixed)|''
*/
public $validate_callback = '';

/**
* Callback to filter a Customize setting value in un-slashed form.
*
* An empty string means there is no callback.
*
* @since 3.4.0
* @var callable
* @var callable|string
* @phpstan-var (callable( mixed, WP_Customize_Setting ): mixed)|''
*/
public $sanitize_callback = '';

/**
* Callback to convert a Customize PHP setting value to a value that is JSON serializable.
*
* An empty string means there is no callback.
*
* @since 3.4.0
* @var callable
* @var callable|string
* @phpstan-var (callable( mixed, WP_Customize_Setting ): mixed)|''
*/
public $sanitize_js_callback = '';

Expand Down
8 changes: 6 additions & 2 deletions src/wp-includes/class-wp-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,20 @@ class WP_Query {
/**
* Metadata query container.
*
* This is false until the query is run.
*
* @since 3.2.0
* @var WP_Meta_Query A meta query instance.
* @var WP_Meta_Query|false A meta query instance.
*/
public $meta_query = false;

/**
* Date query container.
*
* This is false until a query with a `date_query` argument runs.
*
* @since 3.7.0
* @var WP_Date_Query A date query instance.
* @var WP_Date_Query|false A date query instance.
*/
public $date_query = false;

Expand Down
8 changes: 6 additions & 2 deletions src/wp-includes/class-wp-site-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ class WP_Site_Query {
/**
* Metadata query container.
*
* This is false until the query is run.
*
* @since 5.1.0
* @var WP_Meta_Query
* @var WP_Meta_Query|false
*/
public $meta_query = false;

Expand All @@ -59,8 +61,10 @@ class WP_Site_Query {
/**
* Date query container.
*
* This is false until a query with a `date_query` argument runs.
*
* @since 4.6.0
* @var WP_Date_Query A date query instance.
* @var WP_Date_Query|false A date query instance.
*/
public $date_query = false;

Expand Down
4 changes: 3 additions & 1 deletion src/wp-includes/class-wp-term-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ class WP_Term_Query {
/**
* Metadata query container.
*
* This is false until the query is run.
*
* @since 4.6.0
* @var WP_Meta_Query A meta query instance.
* @var WP_Meta_Query|false A meta query instance.
*/
public $meta_query = false;

Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-term.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class WP_Term {
* @since 4.4.0
* @var int
*/
public $term_group = '';
public $term_group = 0;
Comment thread
mukeshpanchal27 marked this conversation as resolved.
Resolved

/**
* Term Taxonomy ID.
Expand Down
4 changes: 3 additions & 1 deletion src/wp-includes/class-wp-user-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ class WP_User_Query {
/**
* Metadata query container.
*
* This is false until the query is run.
*
* @since 4.2.0
* @var WP_Meta_Query
* @var WP_Meta_Query|false
*/
public $meta_query = false;

Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Walker {
* What the class handles.
*
* @since 2.1.0
* @var string
* @var string|string[]
*/
public $tree_type;

Expand Down
15 changes: 0 additions & 15 deletions tests/phpstan/baselines/empty.property.neon
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ parameters:
identifier: empty.property
count: 1
path: ../../../src/wp-includes/blocks.php
-
message: '#^Property WP_Customize_Control\:\:\$active_callback \(callable\) in empty\(\) is not falsy\.$#'
identifier: empty.property
count: 1
path: ../../../src/wp-includes/class-wp-customize-control.php
-
message: '#^Property WP_Customize_Manager\:\:\$nav_menus \(WP_Customize_Nav_Menus\) in empty\(\) is not falsy\.$#'
identifier: empty.property
Expand All @@ -38,16 +33,6 @@ parameters:
identifier: empty.property
count: 1
path: ../../../src/wp-includes/class-wp-customize-manager.php
-
message: '#^Property WP_Customize_Panel\:\:\$active_callback \(callable\) in empty\(\) is not falsy\.$#'
identifier: empty.property
count: 1
path: ../../../src/wp-includes/class-wp-customize-panel.php
-
message: '#^Property WP_Customize_Section\:\:\$active_callback \(callable\) in empty\(\) is not falsy\.$#'
identifier: empty.property
count: 1
path: ../../../src/wp-includes/class-wp-customize-section.php
-
message: '#^Property WP_Customize_Manager\:\:\$nav_menus \(WP_Customize_Nav_Menus\) in empty\(\) is not falsy\.$#'
identifier: empty.property
Expand Down
Loading
Loading