diff --git a/docs/changes/1.x/1.5.0.md b/docs/changes/1.x/1.5.0.md index ba8c15e939..bbe131d32f 100644 --- a/docs/changes/1.x/1.5.0.md +++ b/docs/changes/1.x/1.5.0.md @@ -6,6 +6,8 @@ ### Bug fixes +- Set writeAttribute return type by [@radarhere](https://github.com/radarhere) fixing [#2204](https://github.com/PHPOffice/PHPWord/issues/2204) in [#2776](https://github.com/PHPOffice/PHPWord/pull/2776) + ### Miscellaneous ### Deprecations diff --git a/src/PhpWord/Shared/XMLWriter.php b/src/PhpWord/Shared/XMLWriter.php index 8dc28e1184..441eac05f0 100644 --- a/src/PhpWord/Shared/XMLWriter.php +++ b/src/PhpWord/Shared/XMLWriter.php @@ -19,7 +19,6 @@ namespace PhpOffice\PhpWord\Shared; use Exception; -use ReturnTypeWillChange; /** * XMLWriter. @@ -173,11 +172,8 @@ public function writeAttributeIf($condition, $attribute, $value): void /** * @param string $name * @param mixed $value - * - * @return bool */ - #[ReturnTypeWillChange] - public function writeAttribute($name, $value) + public function writeAttribute($name, $value): bool { if (is_float($value)) { $value = json_encode($value);