| @@ -102,15 +102,15 @@ | ||
| 102 | 102 | * These are typically valueless boolean attributes. |
| 103 | 103 | * |
| 104 | 104 | * @param array<string|int,string|int|null> $atts Array of shortcode attributes. |
| 105 | 105 | * |
| 106 | - * @return array<string,string|int|bool|null> | |
| 106 | + * @return (int|null|string|true)[] | |
| 107 | + * | |
| 108 | + * @psalm-return array<int|string, int|null|string|true> | |
| 107 | 109 | */ |
| 108 | 110 | public function normalize_empty_atts( $atts = [] ) { |
| 109 | - if ( ! is_array( $atts ) ) { | |
| 110 | - if ( empty( $atts ) ) { | |
| 111 | - $atts = []; | |
| 112 | - } | |
| 111 | + if ( ! is_array( $atts ) || empty( $atts ) ) { | |
| 112 | + $atts = []; | |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | foreach ( $atts as $attribute => $value ) { |
| 116 | 116 | if ( is_int( $attribute ) ) { |