Skip to content

Commit a3de6ef

Browse files
authored
Set writeAttribute return type (#2776)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
1 parent 6d75328 commit a3de6ef

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

docs/changes/1.x/1.5.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
### Bug fixes
88

9+
- 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)
10+
911
### Miscellaneous
1012

1113
### Deprecations

src/PhpWord/Shared/XMLWriter.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
namespace PhpOffice\PhpWord\Shared;
2020

2121
use Exception;
22-
use ReturnTypeWillChange;
2322

2423
/**
2524
* XMLWriter.
@@ -173,11 +172,8 @@ public function writeAttributeIf($condition, $attribute, $value): void
173172
/**
174173
* @param string $name
175174
* @param mixed $value
176-
*
177-
* @return bool
178175
*/
179-
#[ReturnTypeWillChange]
180-
public function writeAttribute($name, $value)
176+
public function writeAttribute($name, $value): bool
181177
{
182178
if (is_float($value)) {
183179
$value = json_encode($value);

0 commit comments

Comments
 (0)