diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 08605d3..92b6e18 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -10,9 +10,8 @@ parameters: ignoreErrors: - '#Unsafe usage of new static\(\).#' + - identifier: missingType.generics + - identifier: missingType.iterableValue excludePaths: - - checkMissingIterableValueType: false - - checkGenericClassInNonGenericObjectType: false + - ./src/Html/Fluent.php diff --git a/src/Html/Editor/Fields/Tags.php b/src/Html/Editor/Fields/Tags.php index b406def..d9112d1 100644 --- a/src/Html/Editor/Fields/Tags.php +++ b/src/Html/Editor/Fields/Tags.php @@ -42,19 +42,13 @@ public function escapeLabelHtml(bool $escape): static } /** - * @param array { - * addButton?: string - * inputPlaceholder?: string - * noResults?: string - * title?: string - * placeholder?: string - * } $i18n - * * @see https://editor.datatables.net/reference/field/tags#i18n */ public function i18n(array $i18n): static { - $this->attributes['i18n'] = array_merge($this->attributes['i18n'] ?? [], $i18n); + $options = (array) $this->attributes['i18n']; + + $this->attributes['i18n'] = array_merge($options, $i18n); return $this; }