PHPStan stuff (#1984)
This commit is contained in:
parent
dd74dd7fcf
commit
6446039f4f
|
|
@ -130,7 +130,7 @@ class Calculation
|
||||||
/**
|
/**
|
||||||
* Error message for any error that was raised/thrown by the calculation engine.
|
* Error message for any error that was raised/thrown by the calculation engine.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var null|string
|
||||||
*/
|
*/
|
||||||
public $formulaError;
|
public $formulaError;
|
||||||
|
|
||||||
|
|
@ -204,7 +204,7 @@ class Calculation
|
||||||
/**
|
/**
|
||||||
* Locale-specific translations for Excel constants (True, False and Null).
|
* Locale-specific translations for Excel constants (True, False and Null).
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var array<string, string>
|
||||||
*/
|
*/
|
||||||
public static $localeBoolean = [
|
public static $localeBoolean = [
|
||||||
'TRUE' => 'TRUE',
|
'TRUE' => 'TRUE',
|
||||||
|
|
@ -216,7 +216,7 @@ class Calculation
|
||||||
* Excel constant string translations to their PHP equivalents
|
* Excel constant string translations to their PHP equivalents
|
||||||
* Constant conversion from text name/value to actual (datatyped) value.
|
* Constant conversion from text name/value to actual (datatyped) value.
|
||||||
*
|
*
|
||||||
* @var string[]
|
* @var array<string, mixed>
|
||||||
*/
|
*/
|
||||||
private static $excelConstants = [
|
private static $excelConstants = [
|
||||||
'TRUE' => true,
|
'TRUE' => true,
|
||||||
|
|
@ -3457,8 +3457,8 @@ class Calculation
|
||||||
/**
|
/**
|
||||||
* Ensure that paired matrix operands are both matrices and of the same size.
|
* Ensure that paired matrix operands are both matrices and of the same size.
|
||||||
*
|
*
|
||||||
* @param mixed &$operand1 First matrix operand
|
* @param mixed $operand1 First matrix operand
|
||||||
* @param mixed &$operand2 Second matrix operand
|
* @param mixed $operand2 Second matrix operand
|
||||||
* @param int $resize Flag indicating whether the matrices should be resized to match
|
* @param int $resize Flag indicating whether the matrices should be resized to match
|
||||||
* and (if so), whether the smaller dimension should grow or the
|
* and (if so), whether the smaller dimension should grow or the
|
||||||
* larger should shrink.
|
* larger should shrink.
|
||||||
|
|
@ -3502,7 +3502,7 @@ class Calculation
|
||||||
/**
|
/**
|
||||||
* Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0.
|
* Read the dimensions of a matrix, and re-index it with straight numeric keys starting from row 0, column 0.
|
||||||
*
|
*
|
||||||
* @param array &$matrix matrix operand
|
* @param array $matrix matrix operand
|
||||||
*
|
*
|
||||||
* @return int[] An array comprising the number of rows, and number of columns
|
* @return int[] An array comprising the number of rows, and number of columns
|
||||||
*/
|
*/
|
||||||
|
|
@ -3527,8 +3527,8 @@ class Calculation
|
||||||
/**
|
/**
|
||||||
* Ensure that paired matrix operands are both matrices of the same size.
|
* Ensure that paired matrix operands are both matrices of the same size.
|
||||||
*
|
*
|
||||||
* @param mixed &$matrix1 First matrix operand
|
* @param mixed $matrix1 First matrix operand
|
||||||
* @param mixed &$matrix2 Second matrix operand
|
* @param mixed $matrix2 Second matrix operand
|
||||||
* @param int $matrix1Rows Row size of first matrix operand
|
* @param int $matrix1Rows Row size of first matrix operand
|
||||||
* @param int $matrix1Columns Column size of first matrix operand
|
* @param int $matrix1Columns Column size of first matrix operand
|
||||||
* @param int $matrix2Rows Row size of second matrix operand
|
* @param int $matrix2Rows Row size of second matrix operand
|
||||||
|
|
@ -3570,8 +3570,8 @@ class Calculation
|
||||||
/**
|
/**
|
||||||
* Ensure that paired matrix operands are both matrices of the same size.
|
* Ensure that paired matrix operands are both matrices of the same size.
|
||||||
*
|
*
|
||||||
* @param mixed &$matrix1 First matrix operand
|
* @param mixed $matrix1 First matrix operand
|
||||||
* @param mixed &$matrix2 Second matrix operand
|
* @param mixed $matrix2 Second matrix operand
|
||||||
* @param int $matrix1Rows Row size of first matrix operand
|
* @param int $matrix1Rows Row size of first matrix operand
|
||||||
* @param int $matrix1Columns Column size of first matrix operand
|
* @param int $matrix1Columns Column size of first matrix operand
|
||||||
* @param int $matrix2Rows Row size of second matrix operand
|
* @param int $matrix2Rows Row size of second matrix operand
|
||||||
|
|
@ -3688,6 +3688,8 @@ class Calculation
|
||||||
|
|
||||||
return $typeString . ' with a value of ' . $this->showValue($value);
|
return $typeString . ' with a value of ' . $this->showValue($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -3782,7 +3784,7 @@ class Calculation
|
||||||
/**
|
/**
|
||||||
* @param string $formula
|
* @param string $formula
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return array<int, mixed>|false
|
||||||
*/
|
*/
|
||||||
private function internalParseFormula($formula, ?Cell $pCell = null)
|
private function internalParseFormula($formula, ?Cell $pCell = null)
|
||||||
{
|
{
|
||||||
|
|
@ -4254,7 +4256,7 @@ class Calculation
|
||||||
* @param mixed $tokens
|
* @param mixed $tokens
|
||||||
* @param null|string $cellID
|
* @param null|string $cellID
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return array<int, mixed>|false
|
||||||
*/
|
*/
|
||||||
private function processTokenStack($tokens, $cellID = null, ?Cell $pCell = null)
|
private function processTokenStack($tokens, $cellID = null, ?Cell $pCell = null)
|
||||||
{
|
{
|
||||||
|
|
@ -5101,7 +5103,7 @@ class Calculation
|
||||||
/**
|
/**
|
||||||
* Extract range values.
|
* Extract range values.
|
||||||
*
|
*
|
||||||
* @param string &$pRange String based range representation
|
* @param string $pRange String based range representation
|
||||||
* @param Worksheet $pSheet Worksheet
|
* @param Worksheet $pSheet Worksheet
|
||||||
* @param bool $resetLog Flag indicating whether calculation log should be reset or not
|
* @param bool $resetLog Flag indicating whether calculation log should be reset or not
|
||||||
*
|
*
|
||||||
|
|
@ -5154,7 +5156,7 @@ class Calculation
|
||||||
/**
|
/**
|
||||||
* Extract range values.
|
* Extract range values.
|
||||||
*
|
*
|
||||||
* @param string &$pRange String based range representation
|
* @param string $pRange String based range representation
|
||||||
* @param Worksheet $pSheet Worksheet
|
* @param Worksheet $pSheet Worksheet
|
||||||
* @param bool $resetLog Flag indicating whether calculation log should be reset or not
|
* @param bool $resetLog Flag indicating whether calculation log should be reset or not
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -392,7 +392,8 @@ class Alignment extends Supervisor
|
||||||
if (
|
if (
|
||||||
$this->getHorizontal() != self::HORIZONTAL_GENERAL &&
|
$this->getHorizontal() != self::HORIZONTAL_GENERAL &&
|
||||||
$this->getHorizontal() != self::HORIZONTAL_LEFT &&
|
$this->getHorizontal() != self::HORIZONTAL_LEFT &&
|
||||||
$this->getHorizontal() != self::HORIZONTAL_RIGHT
|
$this->getHorizontal() != self::HORIZONTAL_RIGHT &&
|
||||||
|
$this->getHorizontal() != self::HORIZONTAL_DISTRIBUTED
|
||||||
) {
|
) {
|
||||||
$pValue = 0; // indent not supported
|
$pValue = 0; // indent not supported
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue