Skip to content

Commit 728a605

Browse files
Docs: Remove a blank line between @param and @return in core docblocks.
The [https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/ PHP inline documentation standards] place `@return` immediately after the last `@param` tag, with no blank line between them: {{{ /** * Summary. * * @SInCE x.x.x * * @PARAM string $var Description. * @return string Description. */ }}} This corrects 44 docblocks across 33 files in `src/wp-includes` that used a line break between the two tags. Developed in #13063. Props mukesh27, dhruvang21. See #65818, #65860. git-svn-id: https://develop.svn.wordpress.org/trunk@63320 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 888f0d9 commit 728a605

33 files changed

Lines changed: 0 additions & 44 deletions

‎src/wp-includes/block-editor.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ function get_block_categories( $post_or_block_editor_context ) {
109109
* @since 5.8.0
110110
*
111111
* @param WP_Block_Editor_Context $block_editor_context The current block editor context.
112-
*
113112
* @return bool|string[] Array of block type slugs, or boolean to enable/disable all.
114113
*/
115114
function get_allowed_block_types( $block_editor_context ) {
@@ -484,7 +483,6 @@ function wp_get_post_content_block_attributes() {
484483
*
485484
* @param array $custom_settings Custom settings to use with the given editor type.
486485
* @param WP_Block_Editor_Context $block_editor_context The current block editor context.
487-
*
488486
* @return array The contextualized block editor settings.
489487
*/
490488
function get_block_editor_settings( array $custom_settings, $block_editor_context ) {

‎src/wp-includes/block-supports/aria-label.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ function wp_register_aria_label_support( $block_type ) {
4040
*
4141
* @param WP_Block_Type $block_type Block Type.
4242
* @param array $block_attributes Block attributes.
43-
*
4443
* @return array Block aria-label.
4544
*/
4645
function wp_apply_aria_label_support( $block_type, $block_attributes ) {

‎src/wp-includes/block-supports/block-style-variations.php‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* @since 6.6.0
1414
*
1515
* @param string $class_string CSS class string to look for a variation in.
16-
*
1716
* @return array|null The block style variation name if found.
1817
*/
1918
function wp_get_block_style_variation_name_from_class( $class_string ) {
@@ -75,7 +74,6 @@ function wp_resolve_block_style_variation_ref_values( &$variation_data, $theme_j
7574
* @access private
7675
*
7776
* @param array $parsed_block The parsed block.
78-
*
7977
* @return array The parsed block with block style variation classname added.
8078
*/
8179
function wp_render_block_style_variation_support_styles( $parsed_block ) {
@@ -215,7 +213,6 @@ function wp_render_block_style_variation_support_styles( $parsed_block ) {
215213
*
216214
* @param string $block_content Rendered block content.
217215
* @param array $block Block object.
218-
*
219216
* @return string Filtered block content.
220217
*/
221218
function wp_render_block_style_variation_class_name( $block_content, $block ) {

‎src/wp-includes/block-supports/colors.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ function wp_register_colors_support( $block_type ) {
7878
*
7979
* @param WP_Block_Type $block_type Block type.
8080
* @param array $block_attributes Block attributes.
81-
*
8281
* @return array Colors CSS classes and inline styles.
8382
*/
8483
function wp_apply_colors_support( $block_type, $block_attributes ) {

‎src/wp-includes/block-supports/custom-classname.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ function wp_register_custom_classname_support( $block_type ) {
3838
*
3939
* @param WP_Block_Type $block_type Block Type.
4040
* @param array $block_attributes Block attributes.
41-
*
4241
* @return array Block CSS classes and inline styles.
4342
*/
4443
function wp_apply_custom_classname_support( $block_type, $block_attributes ) {

‎src/wp-includes/block-supports/settings.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ function _wp_add_block_level_presets_class( $block_content, $block ) {
7171
*
7272
* @param string|null $pre_render The pre-rendered content. Default null.
7373
* @param array $block The block being rendered.
74-
*
7574
* @return null
7675
*/
7776
function _wp_add_block_level_preset_styles( $pre_render, $block ) {

‎src/wp-includes/block-supports/utils.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* @param WP_Block_Type $block_type Block type.
1818
* @param string $feature_set Name of block support feature set..
1919
* @param string $feature Optional name of individual feature to check.
20-
*
2120
* @return bool Whether to serialize block support styles & classes.
2221
*/
2322
function wp_should_skip_block_supports_serialization( $block_type, $feature_set, $feature = null ) {

‎src/wp-includes/block-template-utils.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
* @since 5.9.0
3232
*
3333
* @param string $theme_stylesheet The stylesheet. Default is to leverage the main theme root.
34-
*
3534
* @return string[] {
3635
* Folder names used by block themes.
3736
*

‎src/wp-includes/block-template.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,6 @@ function _strip_template_file_suffix( $template_file ) {
431431
* @since 5.8.0
432432
*
433433
* @param array $context Default context.
434-
*
435434
* @return array Filtered context.
436435
*/
437436
function _block_template_render_without_post_block_context( $context ) {

‎src/wp-includes/blocks.php‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,6 @@ function register_block_type_from_metadata( $file_or_folder, $args = array() ) {
623623
* @param array $attributes Block attributes.
624624
* @param string $content Block default content.
625625
* @param WP_Block $block Block instance.
626-
*
627626
* @return string Returns the block content.
628627
*/
629628
$settings['render_callback'] = static function ( $attributes, $content, $block ) use ( $template_path ) {
@@ -1929,7 +1928,6 @@ function traverse_and_serialize_block( $block, $pre_callback = null, $post_callb
19291928
* @since 7.0.0 Adds metadata to attributes of single-pattern container blocks.
19301929
*
19311930
* @param array $blocks An array blocks.
1932-
*
19331931
* @return array An array of blocks with patterns replaced by their content.
19341932
*/
19351933
function resolve_pattern_blocks( $blocks ) {
@@ -2814,7 +2812,6 @@ function wp_migrate_old_typography_shape( $metadata ) {
28142812
*
28152813
* @param WP_Block $block Block instance.
28162814
* @param int $page Current query's page.
2817-
*
28182815
* @return array Returns the constructed WP_Query arguments.
28192816
*/
28202817
function build_query_vars_from_query_block( $block, $page ) {

0 commit comments

Comments
 (0)