Skip to content

Commit 49f83a0

Browse files
simivarProgi1984
andauthored
Apply suggestions from code review
Co-authored-by: Progi1984 <[email protected]>
1 parent c60ca0a commit 49f83a0

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/PhpWord/TemplateProcessor.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,6 @@ public function deleteRow(string $search): void
804804

805805
// Check if there's a cell spanning multiple rows.
806806
if (preg_match('#<w:vMerge w:val="restart"/>#', $xmlRow)) {
807-
// $extraRowStart = $rowEnd;
808807
$extraRowStart = $rowStart;
809808
while (true) {
810809
$extraRowStart = $this->findRowStart($extraRowStart + 1);
@@ -1191,7 +1190,7 @@ protected function findTableStart(int $offset): int
11911190
*
11921191
* @return integer
11931192
*/
1194-
protected function findTableEnd($offset)
1193+
protected function findTableEnd(int $offset): int
11951194
{
11961195
return strpos($this->tempDocumentMainPart, '</w:tbl>', $offset) + 7;
11971196
}

tests/PhpWord/TemplateProcessorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ final public function testXslStyleSheetCanNotBeAppliedOnFailureOfLoadingXmlFromT
185185
* @covers ::saveAs
186186
* @test
187187
*/
188-
public function testDeleteRow()
188+
public function testDeleteRow(): void
189189
{
190190
$templateProcessor = new TemplateProcessor(__DIR__ . '/_files/templates/delete-row.docx');
191191

0 commit comments

Comments
 (0)