From 46e61d4c1845d0f222d353fbf04b950c797beeab Mon Sep 17 00:00:00 2001 From: Krystian Marcisz Date: Sun, 6 Nov 2022 19:02:32 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Progi1984 --- src/PhpWord/TemplateProcessor.php | 3 +-- tests/PhpWordTests/TemplateProcessorTest.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/PhpWord/TemplateProcessor.php b/src/PhpWord/TemplateProcessor.php index 176d9cc4..f2438338 100644 --- a/src/PhpWord/TemplateProcessor.php +++ b/src/PhpWord/TemplateProcessor.php @@ -797,7 +797,6 @@ class TemplateProcessor // Check if there's a cell spanning multiple rows. if (preg_match('##', $xmlRow)) { - // $extraRowStart = $rowEnd; $extraRowStart = $rowStart; while (true) { $extraRowStart = $this->findRowStart($extraRowStart + 1); @@ -1182,7 +1181,7 @@ class TemplateProcessor * * @return integer */ - protected function findTableEnd($offset) + protected function findTableEnd(int $offset): int { return strpos($this->tempDocumentMainPart, '', $offset) + 7; } diff --git a/tests/PhpWordTests/TemplateProcessorTest.php b/tests/PhpWordTests/TemplateProcessorTest.php index 1efe6601..61f76528 100644 --- a/tests/PhpWordTests/TemplateProcessorTest.php +++ b/tests/PhpWordTests/TemplateProcessorTest.php @@ -188,7 +188,7 @@ final class TemplateProcessorTest extends \PHPUnit\Framework\TestCase * @covers ::saveAs * @test */ - public function testDeleteRow() + public function testDeleteRow(): void { $templateProcessor = new TemplateProcessor(__DIR__ . '/_files/templates/delete-row.docx');