From 7fb0a16e6492485c53464113b3f116490776ade8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Chr=C3=A1steck=C3=BD?= Date: Wed, 16 Sep 2020 20:55:46 +0200 Subject: [PATCH] Make DateTimeInterface::format return string|false While the official signature (`public DateTimeInterface::format ( string $format ) : string`) doesn't contain the `false` part, in [return value description](https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-returnvalues) you can read: `Returns the formatted date string on success or FALSE on failure.` --- resources/functionMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/functionMap.php b/resources/functionMap.php index 8f09281826..113dc1a95b 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -1632,7 +1632,7 @@ 'DateTimeImmutable::setTimezone' => ['static', 'timezone'=>'DateTimeZone'], 'DateTimeImmutable::sub' => ['static', 'interval'=>'DateInterval'], 'DateTimeInterface::diff' => ['DateInterval', 'datetime2'=>'DateTimeInterface', 'absolute='=>'bool'], -'DateTimeInterface::format' => ['string', 'format'=>'string'], +'DateTimeInterface::format' => ['string|false', 'format'=>'string'], 'DateTimeInterface::getOffset' => ['int'], 'DateTimeInterface::getTimestamp' => ['int'], 'DateTimeInterface::getTimezone' => ['DateTimeZone'],