@@ -3105,10 +3105,8 @@ public function renameCalculationCacheForWorksheet($fromWorksheetName, $toWorksh
3105
3105
3106
3106
/**
3107
3107
* Enable/disable calculation cache.
3108
- *
3109
- * @param mixed $enabled
3110
3108
*/
3111
- public function setBranchPruningEnabled ($ enabled ): void
3109
+ public function setBranchPruningEnabled (mixed $ enabled ): void
3112
3110
{
3113
3111
$ this ->branchPruningEnabled = $ enabled ;
3114
3112
$ this ->branchPruner = new BranchPruner ($ this ->branchPruningEnabled );
@@ -3439,11 +3437,9 @@ public static function wrapResult(mixed $value)
3439
3437
/**
3440
3438
* Remove quotes used as a wrapper to identify string values.
3441
3439
*
3442
- * @param mixed $value
3443
- *
3444
3440
* @return mixed
3445
3441
*/
3446
- public static function unwrapResult ($ value )
3442
+ public static function unwrapResult (mixed $ value )
3447
3443
{
3448
3444
if (is_string ($ value )) {
3449
3445
if ((isset ($ value [0 ])) && ($ value [0 ] == self ::FORMULA_STRING_QUOTE ) && (substr ($ value , -1 ) == self ::FORMULA_STRING_QUOTE )) {
@@ -3637,10 +3633,7 @@ public function calculateFormula($formula, $cellID = null, ?Cell $cell = null)
3637
3633
return $ result ;
3638
3634
}
3639
3635
3640
- /**
3641
- * @param mixed $cellValue
3642
- */
3643
- public function getValueFromCache (string $ cellReference , &$ cellValue ): bool
3636
+ public function getValueFromCache (string $ cellReference , mixed &$ cellValue ): bool
3644
3637
{
3645
3638
$ this ->debugLog ->writeDebugLog ('Testing cache value for cell %s ' , $ cellReference );
3646
3639
// Is calculation cacheing enabled?
@@ -3659,9 +3652,8 @@ public function getValueFromCache(string $cellReference, &$cellValue): bool
3659
3652
3660
3653
/**
3661
3654
* @param string $cellReference
3662
- * @param mixed $cellValue
3663
3655
*/
3664
- public function saveValueToCache ($ cellReference , $ cellValue ): void
3656
+ public function saveValueToCache ($ cellReference , mixed $ cellValue ): void
3665
3657
{
3666
3658
if ($ this ->calculationCacheEnabled ) {
3667
3659
$ this ->calculationCache [$ cellReference ] = $ cellValue ;
@@ -3759,7 +3751,7 @@ public function _calculateFormulaValue($formula, $cellID = null, ?Cell $cell = n
3759
3751
* 1 = shrink to fit
3760
3752
* 2 = extend to fit
3761
3753
*/
3762
- private static function checkMatrixOperands (&$ operand1 , &$ operand2 , $ resize = 1 ): array
3754
+ private static function checkMatrixOperands (mixed &$ operand1 , mixed &$ operand2 , $ resize = 1 ): array
3763
3755
{
3764
3756
// Examine each of the two operands, and turn them into an array if they aren't one already
3765
3757
// Note that this function should only be called if one or both of the operand is already an array
@@ -3912,7 +3904,7 @@ private static function resizeMatricesExtend(array &$matrix1, array &$matrix2, $
3912
3904
*
3913
3905
* @return mixed
3914
3906
*/
3915
- private function showValue ($ value )
3907
+ private function showValue (mixed $ value )
3916
3908
{
3917
3909
if ($ this ->debugLog ->getWriteDebugLog ()) {
3918
3910
$ testArray = Functions::flattenArray ($ value );
@@ -3950,7 +3942,7 @@ private function showValue($value)
3950
3942
*
3951
3943
* @param mixed $value First matrix operand
3952
3944
*/
3953
- private function showTypeDetails ($ value ): ?string
3945
+ private function showTypeDetails (mixed $ value ): ?string
3954
3946
{
3955
3947
if ($ this ->debugLog ->getWriteDebugLog ()) {
3956
3948
$ testArray = Functions::flattenArray ($ value );
@@ -4609,12 +4601,11 @@ private static function dataTestReference(array &$operandData)
4609
4601
}
4610
4602
4611
4603
/**
4612
- * @param mixed $tokens
4613
4604
* @param null|string $cellID
4614
4605
*
4615
4606
* @return array<int, mixed>|false
4616
4607
*/
4617
- private function processTokenStack ($ tokens , $ cellID = null , ?Cell $ cell = null )
4608
+ private function processTokenStack (mixed $ tokens , $ cellID = null , ?Cell $ cell = null )
4618
4609
{
4619
4610
if ($ tokens === false ) {
4620
4611
return false ;
@@ -5190,11 +5181,7 @@ private function processTokenStack($tokens, $cellID = null, ?Cell $cell = null)
5190
5181
return $ output ;
5191
5182
}
5192
5183
5193
- /**
5194
- * @param mixed $operand
5195
- * @param mixed $stack
5196
- */
5197
- private function validateBinaryOperand (&$ operand , &$ stack ): bool
5184
+ private function validateBinaryOperand (mixed &$ operand , mixed &$ stack ): bool
5198
5185
{
5199
5186
if (is_array ($ operand )) {
5200
5187
if ((count ($ operand , COUNT_RECURSIVE ) - count ($ operand )) == 1 ) {
@@ -5232,11 +5219,7 @@ private function validateBinaryOperand(&$operand, &$stack): bool
5232
5219
return true ;
5233
5220
}
5234
5221
5235
- /**
5236
- * @param mixed $operand1
5237
- * @param mixed $operand2
5238
- */
5239
- private function executeArrayComparison ($ operand1 , $ operand2 , string $ operation , Stack &$ stack , bool $ recursingArrays ): array
5222
+ private function executeArrayComparison (mixed $ operand1 , mixed $ operand2 , string $ operation , Stack &$ stack , bool $ recursingArrays ): array
5240
5223
{
5241
5224
$ result = [];
5242
5225
if (!is_array ($ operand2 )) {
@@ -5275,11 +5258,7 @@ private function executeArrayComparison($operand1, $operand2, string $operation,
5275
5258
return $ result ;
5276
5259
}
5277
5260
5278
- /**
5279
- * @param mixed $operand1
5280
- * @param mixed $operand2
5281
- */
5282
- private function executeBinaryComparisonOperation ($ operand1 , $ operand2 , string $ operation , Stack &$ stack , bool $ recursingArrays = false ): array |bool
5261
+ private function executeBinaryComparisonOperation (mixed $ operand1 , mixed $ operand2 , string $ operation , Stack &$ stack , bool $ recursingArrays = false ): array |bool
5283
5262
{
5284
5263
// If we're dealing with matrix operations, we want a matrix result
5285
5264
if ((is_array ($ operand1 )) || (is_array ($ operand2 ))) {
@@ -5297,14 +5276,12 @@ private function executeBinaryComparisonOperation($operand1, $operand2, string $
5297
5276
}
5298
5277
5299
5278
/**
5300
- * @param mixed $operand1
5301
- * @param mixed $operand2
5302
5279
* @param string $operation
5303
5280
* @param Stack $stack
5304
5281
*
5305
5282
* @return bool|mixed
5306
5283
*/
5307
- private function executeNumericBinaryOperation ($ operand1 , $ operand2 , $ operation , &$ stack )
5284
+ private function executeNumericBinaryOperation (mixed $ operand1 , mixed $ operand2 , $ operation , &$ stack )
5308
5285
{
5309
5286
// Validate the two operands
5310
5287
if (
@@ -5740,18 +5717,15 @@ public function getSuppressFormulaErrors(): bool
5740
5717
return $ this ->suppressFormulaErrorsNew ;
5741
5718
}
5742
5719
5743
- /** @param mixed $arg */
5744
- private static function doNothing ($ arg ): bool
5720
+ private static function doNothing (mixed $ arg ): bool
5745
5721
{
5746
5722
return (bool ) $ arg ;
5747
5723
}
5748
5724
5749
5725
/**
5750
- * @param mixed $operand1
5751
- *
5752
5726
* @return mixed
5753
5727
*/
5754
- private static function boolToString ($ operand1 )
5728
+ private static function boolToString (mixed $ operand1 )
5755
5729
{
5756
5730
if (is_bool ($ operand1 )) {
5757
5731
$ operand1 = ($ operand1 ) ? self ::$ localeBoolean ['TRUE ' ] : self ::$ localeBoolean ['FALSE ' ];
@@ -5762,14 +5736,12 @@ private static function boolToString($operand1)
5762
5736
return $ operand1 ;
5763
5737
}
5764
5738
5765
- /** @param mixed $operand */
5766
- private static function isNumericOrBool ($ operand ): bool
5739
+ private static function isNumericOrBool (mixed $ operand ): bool
5767
5740
{
5768
5741
return is_numeric ($ operand ) || is_bool ($ operand );
5769
5742
}
5770
5743
5771
- /** @param mixed $operand */
5772
- private static function makeError ($ operand = '' ): string
5744
+ private static function makeError (mixed $ operand = '' ): string
5773
5745
{
5774
5746
return Information \ErrorValue::isError ($ operand ) ? $ operand : Information \ExcelError::VALUE ();
5775
5747
}
0 commit comments