src/PhpSpreadsheet/Calculation/MathTrig.php 1 location
|
@@ 951-953 (lines=3) @@
|
948 |
|
{ |
949 |
|
$aValue = Functions::flattenSingleValue($aValue); |
950 |
|
$style = (is_null($style)) ? 0 : (int) Functions::flattenSingleValue($style); |
951 |
|
if ((!is_numeric($aValue)) || ($aValue < 0) || ($aValue >= 4000)) { |
952 |
|
return Functions::VALUE(); |
953 |
|
} |
954 |
|
$aValue = (int) $aValue; |
955 |
|
if ($aValue == 0) { |
956 |
|
return ''; |
src/PhpSpreadsheet/Calculation/DateTime.php 1 location
|
@@ 1258-1262 (lines=5) @@
|
1255 |
|
$dateValue = Functions::flattenSingleValue($dateValue); |
1256 |
|
$method = Functions::flattenSingleValue($method); |
1257 |
|
|
1258 |
|
if (!is_numeric($method)) { |
1259 |
|
return Functions::VALUE(); |
1260 |
|
} elseif (($method < 1) || ($method > 2)) { |
1261 |
|
return Functions::NAN(); |
1262 |
|
} |
1263 |
|
$method = floor($method); |
1264 |
|
|
1265 |
|
if ($dateValue === null) { |