From be93245d50ff497f1b97a7d960c5ea59dbec0ec3 Mon Sep 17 00:00:00 2001 From: Stefan Pasch Date: Fri, 20 Sep 2024 16:08:38 +0200 Subject: [PATCH] Use array as parameter type to be PHP 7.4 compatible. --- classes/class-wp-widget-disable.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/class-wp-widget-disable.php b/classes/class-wp-widget-disable.php index 3d3a35e..422f70c 100644 --- a/classes/class-wp-widget-disable.php +++ b/classes/class-wp-widget-disable.php @@ -438,10 +438,10 @@ public function disable_dashboard_widgets(): void { * * @since 1.0.0 * - * @param mixed $input Sidebar widgets to disable. + * @param mixed[] $input Sidebar widgets to disable. * @return mixed[] */ - public function sanitize_sidebar_widgets( mixed $input ): array { + public function sanitize_sidebar_widgets( array $input ): array { // phpcs:ignore Squiz.Commenting.FunctionComment.IncorrectTypeHint -- mixed is not a valid type hint in PHP 7.4. // If there are settings errors the input was already sanitized. // See https://core.trac.wordpress.org/ticket/21989. if ( $this->has_settings_errors() ) { @@ -498,10 +498,10 @@ public function sanitize_sidebar_widgets( mixed $input ): array { * * @since 1.0.0 * - * @param mixed $input Dashboards widgets to disable. + * @param mixed[] $input Dashboards widgets to disable. * @return mixed[] */ - public function sanitize_dashboard_widgets( mixed $input ): array { + public function sanitize_dashboard_widgets( array $input ): array { // phpcs:ignore Squiz.Commenting.FunctionComment.IncorrectTypeHint -- mixed is not a valid type hint in PHP 7.4. // If there are settings errors the input was already sanitized. // See https://core.trac.wordpress.org/ticket/21989. if ( $this->has_settings_errors() ) {