phpstan appeasement

This commit is contained in:
MarkBaker 2021-06-03 19:23:58 +02:00 committed by Mark Baker
parent 8e41445fbd
commit f135da0b11
2 changed files with 33 additions and 0 deletions

View File

@ -8,12 +8,24 @@ use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
class StringValueBinder implements IValueBinder class StringValueBinder implements IValueBinder
{ {
/**
* @var bool $convertNull
*/
protected $convertNull = true; protected $convertNull = true;
/**
* @var bool $convertBoolean
*/
protected $convertBoolean = true; protected $convertBoolean = true;
/**
* @var bool $convertNumeric
*/
protected $convertNumeric = true; protected $convertNumeric = true;
/**
* @var bool $convertFormula
*/
protected $convertFormula = true; protected $convertFormula = true;
public function setNullConversion(bool $suppressConversion = false): self public function setNullConversion(bool $suppressConversion = false): self

View File

@ -13,6 +13,9 @@ use PHPUnit\Framework\TestCase;
class StringValueBinderTest extends TestCase class StringValueBinderTest extends TestCase
{ {
/**
* @param mixed $expectedValue
*/
protected function createCellStub($expectedValue, string $expectedDataType, bool $quotePrefix = false): Cell protected function createCellStub($expectedValue, string $expectedDataType, bool $quotePrefix = false): Cell
{ {
/** @var Style&MockObject $styleStub */ /** @var Style&MockObject $styleStub */
@ -39,6 +42,9 @@ class StringValueBinderTest extends TestCase
/** /**
* @dataProvider providerDataValuesDefault * @dataProvider providerDataValuesDefault
*
* @param mixed $value
* @param mixed $expectedValue
*/ */
public function testStringValueBinderDefaultBehaviour( public function testStringValueBinderDefaultBehaviour(
$value, $value,
@ -82,6 +88,9 @@ class StringValueBinderTest extends TestCase
/** /**
* @dataProvider providerDataValuesSuppressNullConversion * @dataProvider providerDataValuesSuppressNullConversion
*
* @param mixed $value
* @param mixed $expectedValue
*/ */
public function testStringValueBinderSuppressNullConversion( public function testStringValueBinderSuppressNullConversion(
$value, $value,
@ -105,6 +114,9 @@ class StringValueBinderTest extends TestCase
/** /**
* @dataProvider providerDataValuesSuppressBooleanConversion * @dataProvider providerDataValuesSuppressBooleanConversion
*
* @param mixed $value
* @param mixed $expectedValue
*/ */
public function testStringValueBinderSuppressBooleanConversion( public function testStringValueBinderSuppressBooleanConversion(
$value, $value,
@ -129,6 +141,9 @@ class StringValueBinderTest extends TestCase
/** /**
* @dataProvider providerDataValuesSuppressNumericConversion * @dataProvider providerDataValuesSuppressNumericConversion
*
* @param mixed $value
* @param mixed $expectedValue
*/ */
public function testStringValueBinderSuppressNumericConversion( public function testStringValueBinderSuppressNumericConversion(
$value, $value,
@ -159,6 +174,9 @@ class StringValueBinderTest extends TestCase
/** /**
* @dataProvider providerDataValuesSuppressFormulaConversion * @dataProvider providerDataValuesSuppressFormulaConversion
*
* @param mixed $value
* @param mixed $expectedValue
*/ */
public function testStringValueBinderSuppressFormulaConversion( public function testStringValueBinderSuppressFormulaConversion(
$value, $value,
@ -182,6 +200,9 @@ class StringValueBinderTest extends TestCase
/** /**
* @dataProvider providerDataValuesSuppressAllConversion * @dataProvider providerDataValuesSuppressAllConversion
*
* @param mixed $value
* @param mixed $expectedValue
*/ */
public function testStringValueBinderSuppressAllConversion( public function testStringValueBinderSuppressAllConversion(
$value, $value,