Skip to content

Commit

Permalink
Use array as parameter type to be PHP 7.4 compatible.
Browse files Browse the repository at this point in the history
  • Loading branch information
derpaschi committed Sep 20, 2024
1 parent a5ca14a commit be93245
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions classes/class-wp-widget-disable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() ) {
Expand Down Expand Up @@ -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() ) {
Expand Down

0 comments on commit be93245

Please sign in to comment.