From 752a0a5a6c00f89f8cea6f3ea3584bd5ebac4086 Mon Sep 17 00:00:00 2001 From: Owen Leibman Date: Thu, 25 Jun 2020 23:11:30 -0700 Subject: [PATCH] Scrutinizer Recommendations Two unneeded assignments in tests, one unused parameter in source code. --- src/PhpSpreadsheet/Reader/Html.php | 4 ++-- tests/PhpSpreadsheetTests/Reader/Html/HtmlTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PhpSpreadsheet/Reader/Html.php b/src/PhpSpreadsheet/Reader/Html.php index 7cb14f49..a83ed807 100644 --- a/src/PhpSpreadsheet/Reader/Html.php +++ b/src/PhpSpreadsheet/Reader/Html.php @@ -506,7 +506,7 @@ class Html extends BaseReader if ($child->nodeName !== 'td' && $child->nodeName !== 'th') { $this->processDomElement($child, $sheet, $row, $column, $cellContent); } else { - $this->processDomElementThTd($element, $sheet, $row, $column, $cellContent, $child, $attributeArray); + $this->processDomElementThTd($sheet, $row, $column, $cellContent, $child, $attributeArray); } } @@ -559,7 +559,7 @@ class Html extends BaseReader } } - private function processDomElementThTd(DOMNode $element, Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void + private function processDomElementThTd(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void { while (isset($this->rowspan[$column . $row])) { ++$column; diff --git a/tests/PhpSpreadsheetTests/Reader/Html/HtmlTest.php b/tests/PhpSpreadsheetTests/Reader/Html/HtmlTest.php index e87e636b..91e60d3e 100644 --- a/tests/PhpSpreadsheetTests/Reader/Html/HtmlTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Html/HtmlTest.php @@ -23,7 +23,7 @@ class HtmlTest extends TestCase $filename = 'tests/data/Reader/HTML/badhtml.html'; $reader = new Html(); self::assertTrue($reader->canRead($filename)); - $spreadsheet = $reader->load($filename); + $reader->load($filename); self::assertTrue(false); } @@ -33,7 +33,7 @@ class HtmlTest extends TestCase $filename = __FILE__; $reader = new Html(); self::assertFalse($reader->canRead($filename)); - $spreadsheet = $reader->load($filename); + $reader->load($filename); self::assertTrue(false); }