Remove unused variables

This commit is contained in:
Adrien Crivelli 2016-08-26 15:05:40 +09:00
parent b42bafcfe7
commit 04d6182a81
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
5 changed files with 20 additions and 20 deletions

View File

@ -1565,7 +1565,7 @@ class HTML extends BaseWriter implements IWriter
if (isset($this->isSpannedCell[$sheetIndex][$rowIndex])) { if (isset($this->isSpannedCell[$sheetIndex][$rowIndex])) {
if (count($this->isSpannedCell[$sheetIndex][$rowIndex]) == $countColumns) { if (count($this->isSpannedCell[$sheetIndex][$rowIndex]) == $countColumns) {
$this->isSpannedRow[$sheetIndex][$rowIndex] = $rowIndex; $this->isSpannedRow[$sheetIndex][$rowIndex] = $rowIndex;
}; }
} }
} }

View File

@ -27,7 +27,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
{ {
$cellAddress = 'ABCD'; $cellAddress = 'ABCD';
try { try {
$result = call_user_func([Cell::class, 'columnIndexFromString'], $cellAddress); call_user_func([Cell::class, 'columnIndexFromString'], $cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); $this->assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Column string index can not be longer than 3 characters'); $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 = ''; $cellAddress = '';
try { try {
$result = call_user_func([Cell::class, 'columnIndexFromString'], $cellAddress); call_user_func([Cell::class, 'columnIndexFromString'], $cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); $this->assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Column string index can not be empty'); $this->assertEquals($e->getMessage(), 'Column string index can not be empty');
@ -87,7 +87,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
{ {
$cellAddress = 'A1:AI2012'; $cellAddress = 'A1:AI2012';
try { try {
$result = call_user_func([Cell::class, 'coordinateFromString'], $cellAddress); call_user_func([Cell::class, 'coordinateFromString'], $cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); $this->assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); $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 = ''; $cellAddress = '';
try { try {
$result = call_user_func([Cell::class, 'coordinateFromString'], $cellAddress); call_user_func([Cell::class, 'coordinateFromString'], $cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); $this->assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Cell coordinate can not be zero-length string'); $this->assertEquals($e->getMessage(), 'Cell coordinate can not be zero-length string');
@ -115,7 +115,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
{ {
$cellAddress = 'AI'; $cellAddress = 'AI';
try { try {
$result = call_user_func([Cell::class, 'coordinateFromString'], $cellAddress); call_user_func([Cell::class, 'coordinateFromString'], $cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); $this->assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Invalid cell coordinate ' . $cellAddress); $this->assertEquals($e->getMessage(), 'Invalid cell coordinate ' . $cellAddress);
@ -145,7 +145,7 @@ class CellTest extends \PHPUnit_Framework_TestCase
{ {
$cellAddress = 'A1:AI2012'; $cellAddress = 'A1:AI2012';
try { try {
$result = call_user_func([Cell::class, 'absoluteCoordinate'], $cellAddress); call_user_func([Cell::class, 'absoluteCoordinate'], $cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); $this->assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); $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'; $cellAddress = 'A1:AI2012';
try { try {
$result = call_user_func([Cell::class, 'absoluteReference'], $cellAddress); call_user_func([Cell::class, 'absoluteReference'], $cellAddress);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); $this->assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Cell coordinate string can not be a range of cells'); $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 = ''; $cellRange = '';
try { try {
$result = call_user_func([Cell::class, 'buildRange'], $cellRange); call_user_func([Cell::class, 'buildRange'], $cellRange);
} catch (\Exception $e) { } catch (\Exception $e) {
$this->assertInstanceOf(Exception::class, $e); $this->assertInstanceOf(Exception::class, $e);
$this->assertEquals($e->getMessage(), 'Range does not contain any information'); $this->assertEquals($e->getMessage(), 'Range does not contain any information');

View File

@ -27,7 +27,7 @@ class DataSeriesValuesTest extends \PHPUnit_Framework_TestCase
$testInstance = new DataSeriesValues(); $testInstance = new DataSeriesValues();
try { try {
$result = $testInstance->setDataType('BOOLEAN'); $testInstance->setDataType('BOOLEAN');
} catch (Exception $e) { } catch (Exception $e) {
$this->assertEquals($e->getMessage(), 'Invalid datatype for chart data series values'); $this->assertEquals($e->getMessage(), 'Invalid datatype for chart data series values');
@ -41,7 +41,7 @@ class DataSeriesValuesTest extends \PHPUnit_Framework_TestCase
$dataTypeValue = 'String'; $dataTypeValue = 'String';
$testInstance = new DataSeriesValues(); $testInstance = new DataSeriesValues();
$setValue = $testInstance->setDataType($dataTypeValue); $testInstance->setDataType($dataTypeValue);
$result = $testInstance->getDataType(); $result = $testInstance->getDataType();
$this->assertEquals($dataTypeValue, $result); $this->assertEquals($dataTypeValue, $result);

View File

@ -27,7 +27,7 @@ class CodePageTest extends \PHPUnit_Framework_TestCase
{ {
$invalidCodePage = 12345; $invalidCodePage = 12345;
try { try {
$result = call_user_func([CodePage::class, 'numberToName'], $invalidCodePage); call_user_func([CodePage::class, 'numberToName'], $invalidCodePage);
} catch (Exception $e) { } catch (Exception $e) {
$this->assertEquals($e->getMessage(), 'Unknown codepage: 12345'); $this->assertEquals($e->getMessage(), 'Unknown codepage: 12345');
@ -40,7 +40,7 @@ class CodePageTest extends \PHPUnit_Framework_TestCase
{ {
$unsupportedCodePage = 720; $unsupportedCodePage = 720;
try { try {
$result = call_user_func([CodePage::class, 'numberToName'], $unsupportedCodePage); call_user_func([CodePage::class, 'numberToName'], $unsupportedCodePage);
} catch (Exception $e) { } catch (Exception $e) {
$this->assertEquals($e->getMessage(), 'Code page 720 not supported.'); $this->assertEquals($e->getMessage(), 'Code page 720 not supported.');

View File

@ -31,7 +31,7 @@ class DateTest extends \PHPUnit_Framework_TestCase
*/ */
public function testDateTimeExcelToTimestamp1900() public function testDateTimeExcelToTimestamp1900()
{ {
$result = call_user_func( call_user_func(
[Date::class, 'setExcelCalendar'], [Date::class, 'setExcelCalendar'],
Date::CALENDAR_WINDOWS_1900 Date::CALENDAR_WINDOWS_1900
); );
@ -52,7 +52,7 @@ class DateTest extends \PHPUnit_Framework_TestCase
*/ */
public function testDateTimeTimestampToExcel1900() public function testDateTimeTimestampToExcel1900()
{ {
$result = call_user_func( call_user_func(
[Date::class, 'setExcelCalendar'], [Date::class, 'setExcelCalendar'],
Date::CALENDAR_WINDOWS_1900 Date::CALENDAR_WINDOWS_1900
); );
@ -73,7 +73,7 @@ class DateTest extends \PHPUnit_Framework_TestCase
*/ */
public function testDateTimeDateTimeToExcel() public function testDateTimeDateTimeToExcel()
{ {
$result = call_user_func( call_user_func(
[Date::class, 'setExcelCalendar'], [Date::class, 'setExcelCalendar'],
Date::CALENDAR_WINDOWS_1900 Date::CALENDAR_WINDOWS_1900
); );
@ -94,7 +94,7 @@ class DateTest extends \PHPUnit_Framework_TestCase
*/ */
public function testDateTimeFormattedPHPToExcel1900() public function testDateTimeFormattedPHPToExcel1900()
{ {
$result = call_user_func( call_user_func(
[Date::class, 'setExcelCalendar'], [Date::class, 'setExcelCalendar'],
Date::CALENDAR_WINDOWS_1900 Date::CALENDAR_WINDOWS_1900
); );
@ -115,7 +115,7 @@ class DateTest extends \PHPUnit_Framework_TestCase
*/ */
public function testDateTimeExcelToTimestamp1904() public function testDateTimeExcelToTimestamp1904()
{ {
$result = call_user_func( call_user_func(
[Date::class, 'setExcelCalendar'], [Date::class, 'setExcelCalendar'],
Date::CALENDAR_MAC_1904 Date::CALENDAR_MAC_1904
); );
@ -136,7 +136,7 @@ class DateTest extends \PHPUnit_Framework_TestCase
*/ */
public function testDateTimeTimestampToExcel1904() public function testDateTimeTimestampToExcel1904()
{ {
$result = call_user_func( call_user_func(
[Date::class, 'setExcelCalendar'], [Date::class, 'setExcelCalendar'],
Date::CALENDAR_MAC_1904 Date::CALENDAR_MAC_1904
); );
@ -173,7 +173,7 @@ class DateTest extends \PHPUnit_Framework_TestCase
*/ */
public function testDateTimeExcelToTimestamp1900Timezone() public function testDateTimeExcelToTimestamp1900Timezone()
{ {
$result = call_user_func( call_user_func(
[Date::class, 'setExcelCalendar'], [Date::class, 'setExcelCalendar'],
Date::CALENDAR_WINDOWS_1900 Date::CALENDAR_WINDOWS_1900
); );