From ec1110c719252c69559c7d3b5709a6dc914fd27b Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 1 May 2024 23:59:03 +0000 Subject: [PATCH] Docs: Various docblock corrections. See #60699 git-svn-id: https://develop.svn.wordpress.org/trunk@58073 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/plugin-install.php | 2 +- src/wp-includes/block-bindings.php | 2 +- src/wp-includes/class-wp-block-bindings-registry.php | 2 +- src/wp-includes/class-wp-block-type.php | 6 +++--- src/wp-includes/class-wp-plugin-dependencies.php | 2 -- src/wp-includes/fonts.php | 6 ++++-- src/wp-includes/fonts/class-wp-font-utils.php | 4 ++-- tests/phpunit/tests/user/capabilities.php | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/wp-admin/includes/plugin-install.php b/src/wp-admin/includes/plugin-install.php index a3afbcb8e9791..b8b72a4548a26 100644 --- a/src/wp-admin/includes/plugin-install.php +++ b/src/wp-admin/includes/plugin-install.php @@ -917,7 +917,7 @@ function install_plugin_information() { * } * @param bool $compatible_php The result of a PHP compatibility check. * @param bool $compatible_wp The result of a WP compatibility check. - * @return string $button The markup for the dependency row button. + * @return string The markup for the dependency row button. */ function wp_get_plugin_action_button( $name, $data, $compatible_php, $compatible_wp ) { $button = ''; diff --git a/src/wp-includes/block-bindings.php b/src/wp-includes/block-bindings.php index cee00e246d8c1..d7b2692081090 100644 --- a/src/wp-includes/block-bindings.php +++ b/src/wp-includes/block-bindings.php @@ -76,7 +76,7 @@ * The array of arguments that are used to register a source. * * @type string $label The label of the source. - * @type callback $get_value_callback A callback executed when the source is processed during block rendering. + * @type callable $get_value_callback A callback executed when the source is processed during block rendering. * The callback should have the following signature: * * `function ($source_args, $block_instance,$attribute_name): mixed` diff --git a/src/wp-includes/class-wp-block-bindings-registry.php b/src/wp-includes/class-wp-block-bindings-registry.php index e556982903e49..0d76b1a4c27bb 100644 --- a/src/wp-includes/class-wp-block-bindings-registry.php +++ b/src/wp-includes/class-wp-block-bindings-registry.php @@ -79,7 +79,7 @@ final class WP_Block_Bindings_Registry { * The array of arguments that are used to register a source. * * @type string $label The label of the source. - * @type callback $get_value_callback A callback executed when the source is processed during block rendering. + * @type callable $get_value_callback A callback executed when the source is processed during block rendering. * The callback should have the following signature: * * `function ($source_args, $block_instance,$attribute_name): mixed` diff --git a/src/wp-includes/class-wp-block-type.php b/src/wp-includes/class-wp-block-type.php index 8f88b1a6836a9..6916f6a462981 100644 --- a/src/wp-includes/class-wp-block-type.php +++ b/src/wp-includes/class-wp-block-type.php @@ -302,7 +302,7 @@ class WP_Block_Type { * Deprecated the `editor_script`, `script`, `view_script`, `editor_style`, and `style` properties. * @since 6.3.0 Added the `selectors` property. * @since 6.4.0 Added the `block_hooks` property. - * @since 6.5.0 Added the `view_style_handles` property. + * @since 6.5.0 Added the `allowed_blocks`, `variation_callback`, and `view_style_handles` properties. * * @see register_block_type() * @@ -621,7 +621,7 @@ public function get_variations() { * * @since 6.5.0 * - * @return array[] + * @return string[] */ public function get_uses_context() { /** @@ -629,7 +629,7 @@ public function get_uses_context() { * * @since 6.5.0 * - * @param array $uses_context Array of registered uses context for a block type. + * @param string[] $uses_context Array of registered uses context for a block type. * @param WP_Block_Type $block_type The full block type object. */ return apply_filters( 'get_block_type_uses_context', $this->uses_context, $this ); diff --git a/src/wp-includes/class-wp-plugin-dependencies.php b/src/wp-includes/class-wp-plugin-dependencies.php index 3f64e59c9ab47..d28b401c4d30e 100644 --- a/src/wp-includes/class-wp-plugin-dependencies.php +++ b/src/wp-includes/class-wp-plugin-dependencies.php @@ -553,8 +553,6 @@ protected static function get_plugins() { * Reads and stores dependency slugs from a plugin's 'Requires Plugins' header. * * @since 6.5.0 - * - * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass. */ protected static function read_dependencies_from_plugin_headers() { self::$dependencies = array(); diff --git a/src/wp-includes/fonts.php b/src/wp-includes/fonts.php index 4806662160b81..dedf571489dab 100644 --- a/src/wp-includes/fonts.php +++ b/src/wp-includes/fonts.php @@ -15,11 +15,13 @@ * @param array[][] $fonts { * Optional. The font-families and their font faces. Default empty array. * - * @type array { + * @type array ...$0 { * An indexed or associative (keyed by font-family) array of font variations for this font-family. * Each font face has the following structure. * - * @type array { + * @type array ...$0 { + * The font face properties. + * * @type string $font-family The font-family property. * @type string|string[] $src The URL(s) to each resource containing the font data. * @type string $font-style Optional. The font-style property. Default 'normal'. diff --git a/src/wp-includes/fonts/class-wp-font-utils.php b/src/wp-includes/fonts/class-wp-font-utils.php index 6e914407487c6..2dc685ed0d5cd 100644 --- a/src/wp-includes/fonts/class-wp-font-utils.php +++ b/src/wp-includes/fonts/class-wp-font-utils.php @@ -221,8 +221,8 @@ public static function sanitize_from_schema( $tree, $schema ) { * * @since 6.5.0 * - * @param mixed $value The value to sanitize. - * @param mixed $sanitizer The sanitizer function to apply. + * @param mixed $value The value to sanitize. + * @param callable $sanitizer The sanitizer function to apply. * @return mixed The sanitized value. */ private static function apply_sanitizer( $value, $sanitizer ) { diff --git a/tests/phpunit/tests/user/capabilities.php b/tests/phpunit/tests/user/capabilities.php index 05721ce3f1852..473b0417ba198 100644 --- a/tests/phpunit/tests/user/capabilities.php +++ b/tests/phpunit/tests/user/capabilities.php @@ -454,7 +454,7 @@ public function test_all_caps_of_users_are_being_tested() { /** * Test the tests. The administrator role has all primitive capabilities, therefore the - * primitive capabilitity tests can be tested by checking that the list of tested + * primitive capability tests can be tested by checking that the list of tested * capabilities matches those of the administrator role. * * @group capTestTests