From 04d6182a8154d3cea5a716df9d30f355631d10e5 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Fri, 26 Aug 2016 15:05:40 +0900 Subject: [PATCH] Remove unused variables --- src/PhpSpreadsheet/Writer/HTML.php | 2 +- tests/PhpSpreadsheetTests/CellTest.php | 16 ++++++++-------- .../Chart/DataSeriesValuesTest.php | 4 ++-- .../PhpSpreadsheetTests/Shared/CodePageTest.php | 4 ++-- tests/PhpSpreadsheetTests/Shared/DateTest.php | 14 +++++++------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/PhpSpreadsheet/Writer/HTML.php b/src/PhpSpreadsheet/Writer/HTML.php index 3fa888b2..f840bbaf 100644 --- a/src/PhpSpreadsheet/Writer/HTML.php +++ b/src/PhpSpreadsheet/Writer/HTML.php @@ -1565,7 +1565,7 @@ class HTML extends BaseWriter implements IWriter if (isset($this->isSpannedCell[$sheetIndex][$rowIndex])) { if (count($this->isSpannedCell[$sheetIndex][$rowIndex]) == $countColumns) { $this->isSpannedRow[$sheetIndex][$rowIndex] = $rowIndex; - }; + } } } diff --git a/tests/PhpSpreadsheetTests/CellTest.php b/tests/PhpSpreadsheetTests/CellTest.php index 2112a2bc..7ad5e8bf 100644 --- a/tests/PhpSpreadsheetTests/CellTest.php +++ b/tests/PhpSpreadsheetTests/CellTest.php @@ -27,7 +27,7 @@ class CellTest extends \PHPUnit_Framework_TestCase { $cellAddress = 'ABCD'; try { - $result = call_user_func([Cell::class, 'columnIndexFromString'], $cellAddress); + call_user_func([Cell::class, 'columnIndexFromString'], $cellAddress); } catch (\Exception $e) { $this->assertInstanceOf(Exception::class, $e); $this->assertEquals($e->getMessage(), 'Column string index can not be longer than 3 characters'); @@ -41,7 +41,7 @@ class CellTest extends \PHPUnit_Framework_TestCase { $cellAddress = ''; try { - $result = call_user_func([Cell::class, 'columnIndexFromString'], $cellAddress); + call_user_func([Cell::class, 'columnIndexFromString'], $cellAddress); } catch (\Exception $e) { $this->assertInstanceOf(Exception::class, $e); $this->assertEquals($e->getMessage(), 'Column string index can not be empty'); @@ -87,7 +87,7 @@ class CellTest extends \PHPUnit_Framework_TestCase { $cellAddress = 'A1:AI2012'; try { - $result = call_user_func([Cell::class, 'coordinateFromString'], $cellAddress); + call_user_func([Cell::class, 'coordinateFromString'], $cellAddress); } catch (\Exception $e) { $this->assertInstanceOf(Exception::class, $e); $this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); @@ -101,7 +101,7 @@ class CellTest extends \PHPUnit_Framework_TestCase { $cellAddress = ''; try { - $result = call_user_func([Cell::class, 'coordinateFromString'], $cellAddress); + call_user_func([Cell::class, 'coordinateFromString'], $cellAddress); } catch (\Exception $e) { $this->assertInstanceOf(Exception::class, $e); $this->assertEquals($e->getMessage(), 'Cell coordinate can not be zero-length string'); @@ -115,7 +115,7 @@ class CellTest extends \PHPUnit_Framework_TestCase { $cellAddress = 'AI'; try { - $result = call_user_func([Cell::class, 'coordinateFromString'], $cellAddress); + call_user_func([Cell::class, 'coordinateFromString'], $cellAddress); } catch (\Exception $e) { $this->assertInstanceOf(Exception::class, $e); $this->assertEquals($e->getMessage(), 'Invalid cell coordinate ' . $cellAddress); @@ -145,7 +145,7 @@ class CellTest extends \PHPUnit_Framework_TestCase { $cellAddress = 'A1:AI2012'; try { - $result = call_user_func([Cell::class, 'absoluteCoordinate'], $cellAddress); + call_user_func([Cell::class, 'absoluteCoordinate'], $cellAddress); } catch (\Exception $e) { $this->assertInstanceOf(Exception::class, $e); $this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); @@ -175,7 +175,7 @@ class CellTest extends \PHPUnit_Framework_TestCase { $cellAddress = 'A1:AI2012'; try { - $result = call_user_func([Cell::class, 'absoluteReference'], $cellAddress); + call_user_func([Cell::class, 'absoluteReference'], $cellAddress); } catch (\Exception $e) { $this->assertInstanceOf(Exception::class, $e); $this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); @@ -227,7 +227,7 @@ class CellTest extends \PHPUnit_Framework_TestCase { $cellRange = ''; try { - $result = call_user_func([Cell::class, 'buildRange'], $cellRange); + call_user_func([Cell::class, 'buildRange'], $cellRange); } catch (\Exception $e) { $this->assertInstanceOf(Exception::class, $e); $this->assertEquals($e->getMessage(), 'Range does not contain any information'); diff --git a/tests/PhpSpreadsheetTests/Chart/DataSeriesValuesTest.php b/tests/PhpSpreadsheetTests/Chart/DataSeriesValuesTest.php index 6e12f23b..c94b5b92 100644 --- a/tests/PhpSpreadsheetTests/Chart/DataSeriesValuesTest.php +++ b/tests/PhpSpreadsheetTests/Chart/DataSeriesValuesTest.php @@ -27,7 +27,7 @@ class DataSeriesValuesTest extends \PHPUnit_Framework_TestCase $testInstance = new DataSeriesValues(); try { - $result = $testInstance->setDataType('BOOLEAN'); + $testInstance->setDataType('BOOLEAN'); } catch (Exception $e) { $this->assertEquals($e->getMessage(), 'Invalid datatype for chart data series values'); @@ -41,7 +41,7 @@ class DataSeriesValuesTest extends \PHPUnit_Framework_TestCase $dataTypeValue = 'String'; $testInstance = new DataSeriesValues(); - $setValue = $testInstance->setDataType($dataTypeValue); + $testInstance->setDataType($dataTypeValue); $result = $testInstance->getDataType(); $this->assertEquals($dataTypeValue, $result); diff --git a/tests/PhpSpreadsheetTests/Shared/CodePageTest.php b/tests/PhpSpreadsheetTests/Shared/CodePageTest.php index c0b77c64..10f93449 100644 --- a/tests/PhpSpreadsheetTests/Shared/CodePageTest.php +++ b/tests/PhpSpreadsheetTests/Shared/CodePageTest.php @@ -27,7 +27,7 @@ class CodePageTest extends \PHPUnit_Framework_TestCase { $invalidCodePage = 12345; try { - $result = call_user_func([CodePage::class, 'numberToName'], $invalidCodePage); + call_user_func([CodePage::class, 'numberToName'], $invalidCodePage); } catch (Exception $e) { $this->assertEquals($e->getMessage(), 'Unknown codepage: 12345'); @@ -40,7 +40,7 @@ class CodePageTest extends \PHPUnit_Framework_TestCase { $unsupportedCodePage = 720; try { - $result = call_user_func([CodePage::class, 'numberToName'], $unsupportedCodePage); + call_user_func([CodePage::class, 'numberToName'], $unsupportedCodePage); } catch (Exception $e) { $this->assertEquals($e->getMessage(), 'Code page 720 not supported.'); diff --git a/tests/PhpSpreadsheetTests/Shared/DateTest.php b/tests/PhpSpreadsheetTests/Shared/DateTest.php index 6c68eaeb..ea0182e7 100644 --- a/tests/PhpSpreadsheetTests/Shared/DateTest.php +++ b/tests/PhpSpreadsheetTests/Shared/DateTest.php @@ -31,7 +31,7 @@ class DateTest extends \PHPUnit_Framework_TestCase */ public function testDateTimeExcelToTimestamp1900() { - $result = call_user_func( + call_user_func( [Date::class, 'setExcelCalendar'], Date::CALENDAR_WINDOWS_1900 ); @@ -52,7 +52,7 @@ class DateTest extends \PHPUnit_Framework_TestCase */ public function testDateTimeTimestampToExcel1900() { - $result = call_user_func( + call_user_func( [Date::class, 'setExcelCalendar'], Date::CALENDAR_WINDOWS_1900 ); @@ -73,7 +73,7 @@ class DateTest extends \PHPUnit_Framework_TestCase */ public function testDateTimeDateTimeToExcel() { - $result = call_user_func( + call_user_func( [Date::class, 'setExcelCalendar'], Date::CALENDAR_WINDOWS_1900 ); @@ -94,7 +94,7 @@ class DateTest extends \PHPUnit_Framework_TestCase */ public function testDateTimeFormattedPHPToExcel1900() { - $result = call_user_func( + call_user_func( [Date::class, 'setExcelCalendar'], Date::CALENDAR_WINDOWS_1900 ); @@ -115,7 +115,7 @@ class DateTest extends \PHPUnit_Framework_TestCase */ public function testDateTimeExcelToTimestamp1904() { - $result = call_user_func( + call_user_func( [Date::class, 'setExcelCalendar'], Date::CALENDAR_MAC_1904 ); @@ -136,7 +136,7 @@ class DateTest extends \PHPUnit_Framework_TestCase */ public function testDateTimeTimestampToExcel1904() { - $result = call_user_func( + call_user_func( [Date::class, 'setExcelCalendar'], Date::CALENDAR_MAC_1904 ); @@ -173,7 +173,7 @@ class DateTest extends \PHPUnit_Framework_TestCase */ public function testDateTimeExcelToTimestamp1900Timezone() { - $result = call_user_func( + call_user_func( [Date::class, 'setExcelCalendar'], Date::CALENDAR_WINDOWS_1900 );