diff --git a/src/PhpWord/Writer/ODText.php b/src/PhpWord/Writer/ODText.php index 6d54706c8e..3eaf80ad4f 100644 --- a/src/PhpWord/Writer/ODText.php +++ b/src/PhpWord/Writer/ODText.php @@ -70,10 +70,8 @@ public function __construct(?PhpWord $phpWord = null) /** * Save PhpWord to file. - * - * @param string $filename */ - public function save($filename = null): void + public function save(string $filename): void { $filename = $this->getTempFile($filename); $zip = $this->getZipArchive($filename); diff --git a/src/PhpWord/Writer/RTF.php b/src/PhpWord/Writer/RTF.php index ebbf8f56c0..1d89c03643 100644 --- a/src/PhpWord/Writer/RTF.php +++ b/src/PhpWord/Writer/RTF.php @@ -56,10 +56,8 @@ public function __construct(?PhpWord $phpWord = null) /** * Save content to file. - * - * @param string $filename */ - public function save($filename = null): void + public function save(string $filename): void { $this->writeFile($this->openFile($filename), $this->getContent()); } diff --git a/src/PhpWord/Writer/Word2007.php b/src/PhpWord/Writer/Word2007.php index ae10ba5a74..ab4fd1e3eb 100644 --- a/src/PhpWord/Writer/Word2007.php +++ b/src/PhpWord/Writer/Word2007.php @@ -91,10 +91,8 @@ public function __construct(?PhpWord $phpWord = null) /** * Save document by name. - * - * @param string $filename */ - public function save($filename = null): void + public function save(string $filename): void { $filename = $this->getTempFile($filename); $zip = $this->getZipArchive($filename);