Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 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,7 @@ class Walker_Nav_Menu extends Walker {
* What the class handles.
*
* @since 3.0.0
* @var string
* @var string[]
*
* @see Walker::$tree_type
*/
Expand Down
4 changes: 3 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,10 @@ 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{}
*/
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 unless the query has a `date_query` argument.
*
* @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
* 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
* 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|''
*/
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
* 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
* 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|''
*/
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
* 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
* 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|''
*/
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|''
*/
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|''
*/
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|''
*/
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 unless the query has a `date_query` argument.
*
* @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 unless the query has a `date_query` argument.
*
* @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;

/**
* 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
110 changes: 0 additions & 110 deletions tests/phpstan/baselines/property.defaultValue.neon

This file was deleted.

Loading
Loading