From faa7c870e91673c0a99b84ab01da6c739d5f98fc Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Fri, 22 Jul 2022 11:23:12 +0200 Subject: [PATCH 1/2] Add throws tag to writer::save --- src/PhpSpreadsheet/Writer/IWriter.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PhpSpreadsheet/Writer/IWriter.php b/src/PhpSpreadsheet/Writer/IWriter.php index b0a62726..d8bf1f0c 100644 --- a/src/PhpSpreadsheet/Writer/IWriter.php +++ b/src/PhpSpreadsheet/Writer/IWriter.php @@ -62,6 +62,8 @@ interface IWriter * Save PhpSpreadsheet to file. * * @param resource|string $filename Name of the file to save + * + * @throws Exception */ public function save($filename, int $flags = 0): void; From b3f319a8d38db2961083f61be1733d687d6ded3c Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Fri, 22 Jul 2022 14:37:20 +0200 Subject: [PATCH 2/2] Do not remove @throws --- .php-cs-fixer.dist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index ca2feb42..16809b84 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -55,7 +55,7 @@ $config 'function_declaration' => true, 'function_to_constant' => true, 'function_typehint_space' => true, - 'general_phpdoc_annotation_remove' => ['annotations' => ['access', 'category', 'copyright', 'throws']], + 'general_phpdoc_annotation_remove' => ['annotations' => ['access', 'category', 'copyright']], 'global_namespace_import' => true, 'header_comment' => false, // We don't use common header in all our files 'heredoc_indentation' => false, // Requires PHP >= 7.3