diff --git a/inc/admin/dashboard/main.php b/inc/admin/dashboard/main.php index 6419a44887..b89a48f959 100755 --- a/inc/admin/dashboard/main.php +++ b/inc/admin/dashboard/main.php @@ -1459,11 +1459,16 @@ public static function get_black_friday_data( $default = array() ) { /** * Add the Black Friday data. * - * @param array $configs An array of configurations. + * @param array> $configs An array of configurations. * - * @return array The configurations. + * @return array> The configurations. */ public function add_black_friday_data( $configs ) { + // An earlier filter may drop the default entry, or empty the list to opt out of the sale. + if ( empty( $configs['default'] ) ) { + return $configs; + } + $configs['neve'] = self::get_black_friday_data( $configs['default'] ); return $configs; diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 415a437f5d..57d40bd135 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1464,18 +1464,6 @@ parameters: count: 1 path: inc/admin/dashboard/changelog_handler.php - - - message: '#^Method Neve\\Admin\\Dashboard\\Main\:\:add_black_friday_data\(\) has parameter \$configs with no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: inc/admin/dashboard/main.php - - - - message: '#^Method Neve\\Admin\\Dashboard\\Main\:\:add_black_friday_data\(\) return type has no value type specified in iterable type array\.$#' - identifier: missingType.iterableValue - count: 1 - path: inc/admin/dashboard/main.php - - message: '#^Method Neve\\Admin\\Dashboard\\Main\:\:enqueue\(\) has no return type specified\.$#' identifier: missingType.return