mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-17 21:46:37 +00:00
32-bit Unit Test Warnings (#3232)
* 32-bit Unit Test Warnings Some new problems exposed with latest Php8.1. * Update BitWise.php
This commit is contained in:
@@ -34,7 +34,7 @@ abstract class DatabaseAbstract
|
||||
*/
|
||||
protected static function fieldExtract(array $database, $field): ?int
|
||||
{
|
||||
$field = strtoupper(Functions::flattenSingleValue($field ?? ''));
|
||||
$field = strtoupper(Functions::flattenSingleValue($field) ?? '');
|
||||
if ($field === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -17,10 +17,12 @@ class BitWise
|
||||
* Split a number into upper and lower portions for full 32-bit support.
|
||||
*
|
||||
* @param float|int $number
|
||||
*
|
||||
* @return int[]
|
||||
*/
|
||||
private static function splitNumber($number): array
|
||||
{
|
||||
return [floor($number / self::SPLIT_DIVISOR), fmod($number, self::SPLIT_DIVISOR)];
|
||||
return [(int) floor($number / self::SPLIT_DIVISOR), (int) fmod($number, self::SPLIT_DIVISOR)];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,7 +57,6 @@ class BitWise
|
||||
$split1 = self::splitNumber($number1);
|
||||
$split2 = self::splitNumber($number2);
|
||||
|
||||
// Scrutinizer does not like bitwise, and doesn't let you override its warning
|
||||
return self::SPLIT_DIVISOR * ($split1[0] & $split2[0]) + ($split1[1] & $split2[1]);
|
||||
}
|
||||
|
||||
@@ -92,7 +93,6 @@ class BitWise
|
||||
$split1 = self::splitNumber($number1);
|
||||
$split2 = self::splitNumber($number2);
|
||||
|
||||
// Scrutinizer does not like bitwise, and doesn't let you override its warning
|
||||
return self::SPLIT_DIVISOR * ($split1[0] | $split2[0]) + ($split1[1] | $split2[1]);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class Validations
|
||||
// throw new Exception('Reference is not for this worksheet');
|
||||
// }
|
||||
|
||||
return empty($worksheet) ? strtoupper($address) : $worksheet . '!' . strtoupper($address);
|
||||
return empty($worksheet) ? strtoupper("$address") : $worksheet . '!' . strtoupper("$address");
|
||||
}
|
||||
|
||||
if (is_array($cellAddress)) {
|
||||
|
||||
Reference in New Issue
Block a user