Fix indentation as suggested by Scrunitizer
This commit is contained in:
parent
e9d03cc6d3
commit
ec928d393f
|
@ -178,21 +178,21 @@ class PPS
|
||||||
$ret = str_pad($this->Name, 64, "\x00");
|
$ret = str_pad($this->Name, 64, "\x00");
|
||||||
|
|
||||||
$ret .= pack('v', strlen($this->Name) + 2) // 66
|
$ret .= pack('v', strlen($this->Name) + 2) // 66
|
||||||
. pack('c', $this->Type) // 67
|
. pack('c', $this->Type) // 67
|
||||||
. pack('c', 0x00) //UK // 68
|
. pack('c', 0x00) //UK // 68
|
||||||
. pack('V', $this->PrevPps) //Prev // 72
|
. pack('V', $this->PrevPps) //Prev // 72
|
||||||
. pack('V', $this->NextPps) //Next // 76
|
. pack('V', $this->NextPps) //Next // 76
|
||||||
. pack('V', $this->DirPps) //Dir // 80
|
. pack('V', $this->DirPps) //Dir // 80
|
||||||
. "\x00\x09\x02\x00" // 84
|
. "\x00\x09\x02\x00" // 84
|
||||||
. "\x00\x00\x00\x00" // 88
|
. "\x00\x00\x00\x00" // 88
|
||||||
. "\xc0\x00\x00\x00" // 92
|
. "\xc0\x00\x00\x00" // 92
|
||||||
. "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root
|
. "\x00\x00\x00\x46" // 96 // Seems to be ok only for Root
|
||||||
. "\x00\x00\x00\x00" // 100
|
. "\x00\x00\x00\x00" // 100
|
||||||
. \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108
|
. \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time1st) // 108
|
||||||
. \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116
|
. \PhpOffice\PhpSpreadsheet\Shared\OLE::localDateToOLE($this->Time2nd) // 116
|
||||||
. pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120
|
. pack('V', isset($this->startBlock) ? $this->startBlock : 0) // 120
|
||||||
. pack('V', $this->Size) // 124
|
. pack('V', $this->Size) // 124
|
||||||
. pack('V', 0); // 128
|
. pack('V', 0); // 128
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,30 +52,27 @@ class AdvancedValueBinderTest extends \PHPUnit_Framework_TestCase
|
||||||
*/
|
*/
|
||||||
public function testCurrency($value, $valueBinded, $format, $thousandsSeparator, $decimalSeparator, $currencyCode)
|
public function testCurrency($value, $valueBinded, $format, $thousandsSeparator, $decimalSeparator, $currencyCode)
|
||||||
{
|
{
|
||||||
$sheet = $this->getMock(
|
$sheet = $this->getMock(Worksheet::class, ['getStyle', 'getNumberFormat', 'setFormatCode', 'getCellCacheController']);
|
||||||
Worksheet::class,
|
|
||||||
['getStyle', 'getNumberFormat', 'setFormatCode', 'getCellCacheController']
|
|
||||||
);
|
|
||||||
$cache = $this->getMockBuilder(Memory::class)
|
$cache = $this->getMockBuilder(Memory::class)
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
$cache->expects($this->any())
|
$cache->expects($this->any())
|
||||||
->method('getParent')
|
->method('getParent')
|
||||||
->will($this->returnValue($sheet));
|
->will($this->returnValue($sheet));
|
||||||
|
|
||||||
$sheet->expects($this->once())
|
$sheet->expects($this->once())
|
||||||
->method('getStyle')
|
->method('getStyle')
|
||||||
->will($this->returnSelf());
|
->will($this->returnSelf());
|
||||||
$sheet->expects($this->once())
|
$sheet->expects($this->once())
|
||||||
->method('getNumberFormat')
|
->method('getNumberFormat')
|
||||||
->will($this->returnSelf());
|
->will($this->returnSelf());
|
||||||
$sheet->expects($this->once())
|
$sheet->expects($this->once())
|
||||||
->method('setFormatCode')
|
->method('setFormatCode')
|
||||||
->with($format)
|
->with($format)
|
||||||
->will($this->returnSelf());
|
->will($this->returnSelf());
|
||||||
$sheet->expects($this->any())
|
$sheet->expects($this->any())
|
||||||
->method('getCellCacheController')
|
->method('getCellCacheController')
|
||||||
->will($this->returnValue($cache));
|
->will($this->returnValue($cache));
|
||||||
|
|
||||||
StringHelper::setCurrencyCode($currencyCode);
|
StringHelper::setCurrencyCode($currencyCode);
|
||||||
StringHelper::setDecimalSeparator($decimalSeparator);
|
StringHelper::setDecimalSeparator($decimalSeparator);
|
||||||
|
|
|
@ -27,8 +27,8 @@ class DefaultValueBinderTest extends \PHPUnit_Framework_TestCase
|
||||||
->getMock();
|
->getMock();
|
||||||
// Configure the stub.
|
// Configure the stub.
|
||||||
$this->cellStub->expects($this->any())
|
$this->cellStub->expects($this->any())
|
||||||
->method('setValueExplicit')
|
->method('setValueExplicit')
|
||||||
->will($this->returnValue(true));
|
->will($this->returnValue(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,6 @@ use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column;
|
||||||
class RuleTest extends \PHPUnit_Framework_TestCase
|
class RuleTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private $testAutoFilterRuleObject;
|
private $testAutoFilterRuleObject;
|
||||||
|
|
||||||
private $mockAutoFilterColumnObject;
|
private $mockAutoFilterColumnObject;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
|
|
|
@ -20,10 +20,7 @@ class ColumnTest extends \PHPUnit_Framework_TestCase
|
||||||
->method('testColumnInRange')
|
->method('testColumnInRange')
|
||||||
->will($this->returnValue(3));
|
->will($this->returnValue(3));
|
||||||
|
|
||||||
$this->testAutoFilterColumnObject = new AutoFilter\Column(
|
$this->testAutoFilterColumnObject = new AutoFilter\Column($this->testInitialColumn, $this->mockAutoFilterObject);
|
||||||
$this->testInitialColumn,
|
|
||||||
$this->mockAutoFilterObject
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetColumnIndex()
|
public function testGetColumnIndex()
|
||||||
|
|
|
@ -10,11 +10,8 @@ use PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column;
|
||||||
class AutoFilterTest extends \PHPUnit_Framework_TestCase
|
class AutoFilterTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
private $testInitialRange = 'H2:O256';
|
private $testInitialRange = 'H2:O256';
|
||||||
|
|
||||||
private $testAutoFilterObject;
|
private $testAutoFilterObject;
|
||||||
|
|
||||||
private $mockWorksheetObject;
|
private $mockWorksheetObject;
|
||||||
|
|
||||||
private $mockCacheController;
|
private $mockCacheController;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp()
|
||||||
|
@ -29,10 +26,7 @@ class AutoFilterTest extends \PHPUnit_Framework_TestCase
|
||||||
->method('getCellCacheController')
|
->method('getCellCacheController')
|
||||||
->will($this->returnValue($this->mockCacheController));
|
->will($this->returnValue($this->mockCacheController));
|
||||||
|
|
||||||
$this->testAutoFilterObject = new AutoFilter(
|
$this->testAutoFilterObject = new AutoFilter($this->testInitialRange, $this->mockWorksheetObject);
|
||||||
$this->testInitialRange,
|
|
||||||
$this->mockWorksheetObject
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testToString()
|
public function testToString()
|
||||||
|
|
|
@ -22,11 +22,11 @@ class ColumnCellIteratorTest extends \PHPUnit_Framework_TestCase
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
$this->mockWorksheet->expects($this->any())
|
$this->mockWorksheet->expects($this->any())
|
||||||
->method('getHighestRow')
|
->method('getHighestRow')
|
||||||
->will($this->returnValue(5));
|
->will($this->returnValue(5));
|
||||||
$this->mockWorksheet->expects($this->any())
|
$this->mockWorksheet->expects($this->any())
|
||||||
->method('getCellByColumnAndRow')
|
->method('getCellByColumnAndRow')
|
||||||
->will($this->returnValue($this->mockCell));
|
->will($this->returnValue($this->mockCell));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIteratorFullRange()
|
public function testIteratorFullRange()
|
||||||
|
|
|
@ -22,11 +22,11 @@ class ColumnIteratorTest extends \PHPUnit_Framework_TestCase
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
$this->mockWorksheet->expects($this->any())
|
$this->mockWorksheet->expects($this->any())
|
||||||
->method('getHighestColumn')
|
->method('getHighestColumn')
|
||||||
->will($this->returnValue('E'));
|
->will($this->returnValue('E'));
|
||||||
$this->mockWorksheet->expects($this->any())
|
$this->mockWorksheet->expects($this->any())
|
||||||
->method('current')
|
->method('current')
|
||||||
->will($this->returnValue($this->mockColumn));
|
->will($this->returnValue($this->mockColumn));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIteratorFullRange()
|
public function testIteratorFullRange()
|
||||||
|
|
|
@ -22,11 +22,11 @@ class RowCellIteratorTest extends \PHPUnit_Framework_TestCase
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
$this->mockWorksheet->expects($this->any())
|
$this->mockWorksheet->expects($this->any())
|
||||||
->method('getHighestColumn')
|
->method('getHighestColumn')
|
||||||
->will($this->returnValue('E'));
|
->will($this->returnValue('E'));
|
||||||
$this->mockWorksheet->expects($this->any())
|
$this->mockWorksheet->expects($this->any())
|
||||||
->method('getCellByColumnAndRow')
|
->method('getCellByColumnAndRow')
|
||||||
->will($this->returnValue($this->mockCell));
|
->will($this->returnValue($this->mockCell));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIteratorFullRange()
|
public function testIteratorFullRange()
|
||||||
|
|
|
@ -22,11 +22,11 @@ class RowIteratorTest extends \PHPUnit_Framework_TestCase
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
$this->mockWorksheet->expects($this->any())
|
$this->mockWorksheet->expects($this->any())
|
||||||
->method('getHighestRow')
|
->method('getHighestRow')
|
||||||
->will($this->returnValue(5));
|
->will($this->returnValue(5));
|
||||||
$this->mockWorksheet->expects($this->any())
|
$this->mockWorksheet->expects($this->any())
|
||||||
->method('current')
|
->method('current')
|
||||||
->will($this->returnValue($this->mockRow));
|
->will($this->returnValue($this->mockRow));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testIteratorFullRange()
|
public function testIteratorFullRange()
|
||||||
|
|
|
@ -17,8 +17,8 @@ class WorksheetColumnTest extends \PHPUnit_Framework_TestCase
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
$this->mockWorksheet->expects($this->any())
|
$this->mockWorksheet->expects($this->any())
|
||||||
->method('getHighestRow')
|
->method('getHighestRow')
|
||||||
->will($this->returnValue(5));
|
->will($this->returnValue(5));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInstantiateColumnDefault()
|
public function testInstantiateColumnDefault()
|
||||||
|
|
|
@ -17,8 +17,8 @@ class WorksheetRowTest extends \PHPUnit_Framework_TestCase
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
$this->mockWorksheet->expects($this->any())
|
$this->mockWorksheet->expects($this->any())
|
||||||
->method('getHighestColumn')
|
->method('getHighestColumn')
|
||||||
->will($this->returnValue('E'));
|
->will($this->returnValue('E'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testInstantiateRowDefault()
|
public function testInstantiateRowDefault()
|
||||||
|
|
Loading…
Reference in New Issue