| @@ -12,9 +12,9 @@ | ||
| 12 | 12 | * Retrieve data for a widget from options table. |
| 13 | 13 | * |
| 14 | 14 | * @param string $widget_id The unique ID of a widget. |
| 15 | 15 | * |
| 16 | - * @return array The array of widget settings or empty array if none | |
| 16 | + * @return array<string,mixed> The array of widget settings or empty array if none | |
| 17 | 17 | */ |
| 18 | 18 | function get_options( $widget_id ) { |
| 19 | 19 | static $options = []; |
| 20 | 20 | |
| @@ -44,17 +44,13 @@ | ||
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * Checks for & adds missing widget options to prevent errors or missing data. |
| 47 | 47 | * |
| 48 | - * @param array $options Widget options. | |
| 48 | + * @param array<string,mixed> $options Widget options. | |
| 49 | 49 | * |
| 50 | - * @return array | |
| 50 | + * @return array<string,mixed> | |
| 51 | 51 | */ |
| 52 | 52 | function parse_options( $options = [] ) { |
| 53 | - if ( ! is_array( $options ) ) { | |
| 54 | - $options = []; | |
| 55 | - } | |
| 56 | - | |
| 57 | 53 | return wp_parse_args( $options, [ |
| 58 | 54 | 'which_users' => '', |
| 59 | 55 | 'roles' => [], |
| 60 | 56 | ] ); |