← All changes
|
libraries/vendor/PhpSpreadsheet/Calculation/TextData/Format.php
+4
-2
3.3.3
→
3.4
View file →
| @@ -206,20 +206,22 @@ | ||
| 206 | 206 | $dateSetting = Functions::getReturnDateType(); |
| 207 | 207 | Functions::setReturnDateType(Functions::RETURNDATE_EXCEL); |
| 208 | 208 | |
| 209 | 209 | if (str_contains($value, ':')) { |
| 210 | + /** @var DateTimeInterface|float|int|string */ | |
| 210 | 211 | $timeValue = Functions::scalar(DateTimeExcel\TimeValue::fromString($value)); |
| 211 | 212 | if ($timeValue !== ExcelError::VALUE()) { |
| 212 | 213 | Functions::setReturnDateType($dateSetting); |
| 213 | 214 | |
| 214 | - return $timeValue; //* @phpstan-ignore-line | |
| 215 | + return $timeValue; | |
| 215 | 216 | } |
| 216 | 217 | } |
| 218 | + /** @var DateTimeInterface|float|int|string */ | |
| 217 | 219 | $dateValue = Functions::scalar(DateTimeExcel\DateValue::fromString($value)); |
| 218 | 220 | if ($dateValue !== ExcelError::VALUE()) { |
| 219 | 221 | Functions::setReturnDateType($dateSetting); |
| 220 | 222 | |
| 221 | - return $dateValue; //* @phpstan-ignore-line | |
| 223 | + return $dateValue; | |
| 222 | 224 | } |
| 223 | 225 | Functions::setReturnDateType($dateSetting); |
| 224 | 226 | |
| 225 | 227 | return ExcelError::VALUE(); |