Skip to content

Commit 7fb0a16

Browse files
authored
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.`
1 parent a5f31ac commit 7fb0a16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

resources/functionMap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1632,7 +1632,7 @@
16321632
'DateTimeImmutable::setTimezone' => ['static', 'timezone'=>'DateTimeZone'],
16331633
'DateTimeImmutable::sub' => ['static', 'interval'=>'DateInterval'],
16341634
'DateTimeInterface::diff' => ['DateInterval', 'datetime2'=>'DateTimeInterface', 'absolute='=>'bool'],
1635-
'DateTimeInterface::format' => ['string', 'format'=>'string'],
1635+
'DateTimeInterface::format' => ['string|false', 'format'=>'string'],
16361636
'DateTimeInterface::getOffset' => ['int'],
16371637
'DateTimeInterface::getTimestamp' => ['int'],
16381638
'DateTimeInterface::getTimezone' => ['DateTimeZone'],

0 commit comments

Comments
 (0)