Fix indentation as suggested by Scrunitizer

This commit is contained in:
Adrien Crivelli 2017-01-05 12:26:20 +09:00
parent e9d03cc6d3
commit ec928d393f
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
12 changed files with 51 additions and 64 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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));
}
/**

View File

@ -7,7 +7,6 @@ use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column;
class RuleTest extends \PHPUnit_Framework_TestCase
{
private $testAutoFilterRuleObject;
private $mockAutoFilterColumnObject;
public function setUp()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()

View File

@ -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()