Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 3 additions & 0 deletions backport-changelog/7.2/13414.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/13414

* https://github.com/WordPress/gutenberg/pull/81904
4 changes: 2 additions & 2 deletions phpunit/block-supports/aria-label-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ private function register_aria_label_block_with_support( $block_name, $supports
*
* @dataProvider data_aria_label_block_support
*
* @param boolean|array $support Aria label block support configuration.
* @param string $value Aria label value for attribute object.
* @param boolean|array $support Aria label block support configuration.
* @param string $value Aria label value for attribute object.
* @param array $expected Expected aria-label attributes.
*/
public function test_gutenberg_apply_aria_label_support( $support, $value, $expected ) {
Expand Down
4 changes: 2 additions & 2 deletions phpunit/block-supports/layout-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,8 @@ public function data_restore_group_inner_container() {
*
* @covers ::gutenberg_render_layout_support_flag
*
* @param array $block_attrs Dataset to test.
* @param array $expected_class Class generated for the passed dataset.
* @param array $block_attrs Dataset to test.
* @param array $expected_class Class generated for the passed dataset.
*/
public function test_layout_support_flag_renders_consistent_container_hash( $block_attrs, $expected_class ) {
switch_theme( 'default' );
Expand Down
6 changes: 3 additions & 3 deletions phpunit/block-supports/shadow-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ private function register_shadow_block_with_support( $block_name, $supports = ar
*
* @dataProvider data_generate_shadow_fixtures
*
* @param boolean|array $support Shadow block support configuration.
* @param string $value Shadow style value for style attribute object.
* @param array $expected Expected shadow block support styles.
* @param boolean|array $support Shadow block support configuration.
* @param string $value Shadow style value for style attribute object.
* @param array $expected Expected shadow block support styles.
*/
public function test_gutenberg_apply_shadow_support( $support, $value, $expected ) {
$block_type = self::register_shadow_block_with_support(
Expand Down
4 changes: 2 additions & 2 deletions phpunit/block-supports/states-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ private function ensure_block_registered( $block_name, $selectors = array(), $su
* to produce the unique scoped class name for a given map of state => style arrays.
* CSS is now registered with the style engine store rather than injected inline.
*
* @param array $state_styles Map of state to style array (e.g. `[':hover' => ['color' => [...]]]`).
* @param string $block_name Block name.
* @param array $state_styles Map of state to style array (e.g. `[':hover' => ['color' => [...]]]`).
* @param string $block_name Block name.
* @return array { unique_class: string }
*/
private function build_expected_state_output( $state_styles, $block_name = 'core/navigation-link' ) {
Expand Down
12 changes: 6 additions & 6 deletions phpunit/block-supports/typography-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public function test_should_generate_classname_for_font_family() {
*
* @dataProvider data_generate_font_size_preset_fixtures
*
* @param array $font_size {
* @param array $font_size {
* Required. A font size as represented in the fontSizes preset format as seen in theme.json.
*
* @type string $name Name of the font size preset.
Expand Down Expand Up @@ -810,15 +810,15 @@ public function data_generate_font_size_preset_fixtures() {
*
* @dataProvider data_generate_font_size_preset_should_use_fluid_typography_deprecated_fixtures
*
* @param array $font_size {
* @param array $font_size {
* Required. A font size as represented in the fontSizes preset format as seen in theme.json.
*
* @type string $name Name of the font size preset.
* @type string $slug Kebab-case unique identifier for the font size preset.
* @type string $size CSS font-size value, including units where applicable.
* }
* @param bool $should_use_fluid_typography An override to switch fluid typography "on". Can be used for unit testing.
* @param string $expected_output Expected output of gutenberg_get_typography_font_size_value().
* @param string $expected_output Expected output of gutenberg_get_typography_font_size_value().
*/
public function test_gutenberg_get_typography_font_size_value_should_use_fluid_typography_deprecated( $font_size, $should_use_fluid_typography, $expected_output ) {
$actual = gutenberg_get_typography_font_size_value( $font_size, $should_use_fluid_typography );
Expand Down Expand Up @@ -858,7 +858,7 @@ public function data_generate_font_size_preset_should_use_fluid_typography_depre
*
* @dataProvider data_generate_should_override_theme_settings_fixtures
*
* @param array $font_size {
* @param array $font_size {
* Required. A font size as represented in the fontSizes preset format as seen in theme.json.
*
* @type string $name Name of the font size preset.
Expand Down Expand Up @@ -1241,7 +1241,7 @@ public function data_invalid_size_wp_get_typography_value_and_unit() {
*
* @dataProvider data_get_computed_fluid_typography_value
*
* @param array $args {
* @param array $args {
* Optional. An associative array of values to calculate a fluid formula for font size. Default is empty array.
*
* @type string $maximum_viewport_width Maximum size up to which type will have fluidity.
Expand All @@ -1250,7 +1250,7 @@ public function data_invalid_size_wp_get_typography_value_and_unit() {
* @type string $minimum_font_size Minimum font size for any clamp() calculation.
* @type int $scale_factor A scale factor to determine how fast a font scales within boundaries.
* }
* @param string $expected_output Expected value of style property from gutenberg_apply_typography_support().
* @param string $expected_output Expected value of style property from gutenberg_apply_typography_support().
*/
public function test_get_computed_fluid_typography_value( $args, $expected_output ) {
$actual = gutenberg_get_computed_fluid_typography_value( $args );
Expand Down
2 changes: 1 addition & 1 deletion phpunit/blocks/block-navigation-link-variations-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function test_navigation_link_variations_unregister_taxonomy() {
* Get a variation by its name from an array of variations.
*
* @param string $variation_name The name (= slug) of the variation.
* @param array $variations An array of variations.
* @param array $variations An array of variations.
* @return array|null The found variation or null.
*/
private function get_variation_by_name( $variation_name, $variations ) {
Expand Down
4 changes: 2 additions & 2 deletions phpunit/class-wp-theme-json-selector-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class WP_Theme_JSON_Gutenberg_Selector_List_Test extends WP_UnitTestCase {
* Invokes a protected static method on WP_Theme_JSON_Gutenberg.
*
* @param string $method_name Method name.
* @param mixed ...$args Method arguments.
* @param mixed ...$args Method arguments.
* @return mixed Method result.
*/
private static function invoke_theme_json_method( $method_name, ...$args ) {
Expand All @@ -29,7 +29,7 @@ private static function invoke_theme_json_method( $method_name, ...$args ) {
/**
* @dataProvider data_split_selector_list
*
* @param string $selector CSS selector list.
* @param string $selector CSS selector list.
* @param string[] $expected Expected selectors.
*/
public function test_split_selector_list( $selector, $expected ) {
Expand Down
4 changes: 2 additions & 2 deletions phpunit/class-wp-theme-json-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -7555,8 +7555,8 @@ public function test_resolve_variables() {
*
* @dataProvider data_get_block_style_variation_selector
*
* @param string $selector CSS selector.
* @param string $expected Expected block style variation CSS selector.
* @param string $selector CSS selector.
* @param string $expected Expected block style variation CSS selector.
*/
public function test_get_block_style_variation_selector( $selector, $expected ) {
$theme_json = new ReflectionClass( 'WP_Theme_JSON_Gutenberg' );
Expand Down
4 changes: 2 additions & 2 deletions phpunit/notes-mentions-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public function set_up(): void {
/**
* Records wp_mail() calls and short-circuits delivery.
*
* @param null $short_circuit Short-circuit value.
* @param array{ to: string|string[], subject: string, message: string } $atts wp_mail() arguments.
* @param null $short_circuit Short-circuit value.
* @param array{ to: string|string[], subject: string, message: string } $atts wp_mail() arguments.
* @return bool Always true to indicate a "sent" message.
*/
public function capture_mail( $short_circuit, $atts ): bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private function check_function_usage( File $phpcs_file, $stack_pointer ) {
*
* @param File $phpcs_file File being scanned.
* @param int $stack_pointer Position of the text token in the token stack.
* @return bool Returns true if the token is guarded.
* @return bool Returns true if the token is guarded.
*/
private function check_if_token_guarded( File $phpcs_file, $stack_pointer ) {
if ( false === $phpcs_file->hasCondition( $stack_pointer, T_IF ) ) {
Expand Down
Loading