From ec928d393f2761e137065f5d7e9acc49c638e335 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Thu, 5 Jan 2017 12:26:20 +0900 Subject: [PATCH] Fix indentation as suggested by Scrunitizer --- src/PhpSpreadsheet/Shared/OLE/PPS.php | 30 +++++++++---------- .../Cell/AdvancedValueBinderTest.php | 27 ++++++++--------- .../Cell/DefaultValueBinderTest.php | 4 +-- .../Worksheet/AutoFilter/Column/RuleTest.php | 1 - .../Worksheet/AutoFilter/ColumnTest.php | 5 +--- .../Worksheet/AutoFilterTest.php | 8 +---- .../Worksheet/ColumnCellIteratorTest.php | 8 ++--- .../Worksheet/ColumnIteratorTest.php | 8 ++--- .../Worksheet/RowCellIteratorTest.php | 8 ++--- .../Worksheet/RowIteratorTest.php | 8 ++--- .../Worksheet/WorksheetColumnTest.php | 4 +-- .../Worksheet/WorksheetRowTest.php | 4 +-- 12 files changed, 51 insertions(+), 64 deletions(-) diff --git a/src/PhpSpreadsheet/Shared/OLE/PPS.php b/src/PhpSpreadsheet/Shared/OLE/PPS.php index da46d3e2..ed3cb2c9 100644 --- a/src/PhpSpreadsheet/Shared/OLE/PPS.php +++ b/src/PhpSpreadsheet/Shared/OLE/PPS.php @@ -178,21 +178,21 @@ class PPS $ret = str_pad($this->Name, 64, "\x00"); $ret .= pack('v', strlen($this->Name) + 2) // 66 - . pack('c', $this->Type) // 67 - . pack('c', 0x00) //UK // 68 - . pack('V', $this->PrevPps) //Prev // 72 - . pack('V', $this->NextPps) //Next // 76 - . pack('V', $this->DirPps) //Dir // 80 - . "\x00\x09\x02\x00" // 84 - . "\x00\x00\x00\x00" // 88 - . "\xc0\x00\x00\x00" // 92 - . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root - . "\x00\x00\x00\x00" // 100 - . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108 - . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116 - . pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 - . pack('V', $this->Size) // 124 - . pack('V', 0); // 128 + . pack('c', $this->Type) // 67 + . pack('c', 0x00) //UK // 68 + . pack('V', $this->PrevPps) //Prev // 72 + . pack('V', $this->NextPps) //Next // 76 + . pack('V', $this->DirPps) //Dir // 80 + . "\x00\x09\x02\x00" // 84 + . "\x00\x00\x00\x00" // 88 + . "\xc0\x00\x00\x00" // 92 + . "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root + . "\x00\x00\x00\x00" // 100 + . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108 + . \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116 + . pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120 + . pack('V', $this->Size) // 124 + . pack('V', 0); // 128 return $ret; } diff --git a/tests/PhpSpreadsheetTests/Cell/AdvancedValueBinderTest.php b/tests/PhpSpreadsheetTests/Cell/AdvancedValueBinderTest.php index 94be08b1..cba8af88 100644 --- a/tests/PhpSpreadsheetTests/Cell/AdvancedValueBinderTest.php +++ b/tests/PhpSpreadsheetTests/Cell/AdvancedValueBinderTest.php @@ -52,30 +52,27 @@ class AdvancedValueBinderTest extends \PHPUnit_Framework_TestCase */ public function testCurrency($value, $valueBinded, $format, $thousandsSeparator, $decimalSeparator, $currencyCode) { - $sheet = $this->getMock( - Worksheet::class, - ['getStyle', 'getNumberFormat', 'setFormatCode', 'getCellCacheController'] - ); + $sheet = $this->getMock(Worksheet::class, ['getStyle', 'getNumberFormat', 'setFormatCode', 'getCellCacheController']); $cache = $this->getMockBuilder(Memory::class) ->disableOriginalConstructor() ->getMock(); $cache->expects($this->any()) - ->method('getParent') - ->will($this->returnValue($sheet)); + ->method('getParent') + ->will($this->returnValue($sheet)); $sheet->expects($this->once()) - ->method('getStyle') - ->will($this->returnSelf()); + ->method('getStyle') + ->will($this->returnSelf()); $sheet->expects($this->once()) - ->method('getNumberFormat') - ->will($this->returnSelf()); + ->method('getNumberFormat') + ->will($this->returnSelf()); $sheet->expects($this->once()) - ->method('setFormatCode') - ->with($format) - ->will($this->returnSelf()); + ->method('setFormatCode') + ->with($format) + ->will($this->returnSelf()); $sheet->expects($this->any()) - ->method('getCellCacheController') - ->will($this->returnValue($cache)); + ->method('getCellCacheController') + ->will($this->returnValue($cache)); StringHelper::setCurrencyCode($currencyCode); StringHelper::setDecimalSeparator($decimalSeparator); diff --git a/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php b/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php index fe0a0c80..48c4bfcb 100644 --- a/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php +++ b/tests/PhpSpreadsheetTests/Cell/DefaultValueBinderTest.php @@ -27,8 +27,8 @@ class DefaultValueBinderTest extends \PHPUnit_Framework_TestCase ->getMock(); // Configure the stub. $this->cellStub->expects($this->any()) - ->method('setValueExplicit') - ->will($this->returnValue(true)); + ->method('setValueExplicit') + ->will($this->returnValue(true)); } /** diff --git a/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/Column/RuleTest.php b/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/Column/RuleTest.php index e1e2d0a7..73baf072 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/Column/RuleTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/Column/RuleTest.php @@ -7,7 +7,6 @@ use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column; class RuleTest extends \PHPUnit_Framework_TestCase { private $testAutoFilterRuleObject; - private $mockAutoFilterColumnObject; public function setUp() diff --git a/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/ColumnTest.php b/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/ColumnTest.php index 85b888df..b65f8cb8 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/ColumnTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/AutoFilter/ColumnTest.php @@ -20,10 +20,7 @@ class ColumnTest extends \PHPUnit_Framework_TestCase ->method('testColumnInRange') ->will($this->returnValue(3)); - $this->testAutoFilterColumnObject = new AutoFilter\Column( - $this->testInitialColumn, - $this->mockAutoFilterObject - ); + $this->testAutoFilterColumnObject = new AutoFilter\Column($this->testInitialColumn, $this->mockAutoFilterObject); } public function testGetColumnIndex() diff --git a/tests/PhpSpreadsheetTests/Worksheet/AutoFilterTest.php b/tests/PhpSpreadsheetTests/Worksheet/AutoFilterTest.php index e00d11ed..bead23ea 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/AutoFilterTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/AutoFilterTest.php @@ -10,11 +10,8 @@ use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column; class AutoFilterTest extends \PHPUnit_Framework_TestCase { private $testInitialRange = 'H2:O256'; - private $testAutoFilterObject; - private $mockWorksheetObject; - private $mockCacheController; public function setUp() @@ -29,10 +26,7 @@ class AutoFilterTest extends \PHPUnit_Framework_TestCase ->method('getCellCacheController') ->will($this->returnValue($this->mockCacheController)); - $this->testAutoFilterObject = new AutoFilter( - $this->testInitialRange, - $this->mockWorksheetObject - ); + $this->testAutoFilterObject = new AutoFilter($this->testInitialRange, $this->mockWorksheetObject); } public function testToString() diff --git a/tests/PhpSpreadsheetTests/Worksheet/ColumnCellIteratorTest.php b/tests/PhpSpreadsheetTests/Worksheet/ColumnCellIteratorTest.php index 062897c1..997307a4 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/ColumnCellIteratorTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/ColumnCellIteratorTest.php @@ -22,11 +22,11 @@ class ColumnCellIteratorTest extends \PHPUnit_Framework_TestCase ->getMock(); $this->mockWorksheet->expects($this->any()) - ->method('getHighestRow') - ->will($this->returnValue(5)); + ->method('getHighestRow') + ->will($this->returnValue(5)); $this->mockWorksheet->expects($this->any()) - ->method('getCellByColumnAndRow') - ->will($this->returnValue($this->mockCell)); + ->method('getCellByColumnAndRow') + ->will($this->returnValue($this->mockCell)); } public function testIteratorFullRange() diff --git a/tests/PhpSpreadsheetTests/Worksheet/ColumnIteratorTest.php b/tests/PhpSpreadsheetTests/Worksheet/ColumnIteratorTest.php index 9792175b..62105343 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/ColumnIteratorTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/ColumnIteratorTest.php @@ -22,11 +22,11 @@ class ColumnIteratorTest extends \PHPUnit_Framework_TestCase ->getMock(); $this->mockWorksheet->expects($this->any()) - ->method('getHighestColumn') - ->will($this->returnValue('E')); + ->method('getHighestColumn') + ->will($this->returnValue('E')); $this->mockWorksheet->expects($this->any()) - ->method('current') - ->will($this->returnValue($this->mockColumn)); + ->method('current') + ->will($this->returnValue($this->mockColumn)); } public function testIteratorFullRange() diff --git a/tests/PhpSpreadsheetTests/Worksheet/RowCellIteratorTest.php b/tests/PhpSpreadsheetTests/Worksheet/RowCellIteratorTest.php index e5f1fea5..e63d3f95 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/RowCellIteratorTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/RowCellIteratorTest.php @@ -22,11 +22,11 @@ class RowCellIteratorTest extends \PHPUnit_Framework_TestCase ->getMock(); $this->mockWorksheet->expects($this->any()) - ->method('getHighestColumn') - ->will($this->returnValue('E')); + ->method('getHighestColumn') + ->will($this->returnValue('E')); $this->mockWorksheet->expects($this->any()) - ->method('getCellByColumnAndRow') - ->will($this->returnValue($this->mockCell)); + ->method('getCellByColumnAndRow') + ->will($this->returnValue($this->mockCell)); } public function testIteratorFullRange() diff --git a/tests/PhpSpreadsheetTests/Worksheet/RowIteratorTest.php b/tests/PhpSpreadsheetTests/Worksheet/RowIteratorTest.php index 0baf8971..cb172b4d 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/RowIteratorTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/RowIteratorTest.php @@ -22,11 +22,11 @@ class RowIteratorTest extends \PHPUnit_Framework_TestCase ->getMock(); $this->mockWorksheet->expects($this->any()) - ->method('getHighestRow') - ->will($this->returnValue(5)); + ->method('getHighestRow') + ->will($this->returnValue(5)); $this->mockWorksheet->expects($this->any()) - ->method('current') - ->will($this->returnValue($this->mockRow)); + ->method('current') + ->will($this->returnValue($this->mockRow)); } public function testIteratorFullRange() diff --git a/tests/PhpSpreadsheetTests/Worksheet/WorksheetColumnTest.php b/tests/PhpSpreadsheetTests/Worksheet/WorksheetColumnTest.php index 2f54c6c5..7c1c3487 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/WorksheetColumnTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/WorksheetColumnTest.php @@ -17,8 +17,8 @@ class WorksheetColumnTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); $this->mockWorksheet->expects($this->any()) - ->method('getHighestRow') - ->will($this->returnValue(5)); + ->method('getHighestRow') + ->will($this->returnValue(5)); } public function testInstantiateColumnDefault() diff --git a/tests/PhpSpreadsheetTests/Worksheet/WorksheetRowTest.php b/tests/PhpSpreadsheetTests/Worksheet/WorksheetRowTest.php index 1ee2e856..59901f44 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/WorksheetRowTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/WorksheetRowTest.php @@ -17,8 +17,8 @@ class WorksheetRowTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); $this->mockWorksheet->expects($this->any()) - ->method('getHighestColumn') - ->will($this->returnValue('E')); + ->method('getHighestColumn') + ->will($this->returnValue('E')); } public function testInstantiateRowDefault()