Skip to content

Commit

Permalink
DateTimeZone::getName() always returns non-empty-string and canno…
Browse files Browse the repository at this point in the history
…t be constructed with an empty string

Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Sep 9, 2023
1 parent f782767 commit b4e1eeb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dictionaries/CallMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1390,11 +1390,11 @@
'DateTimeInterface::getTimezone' => ['DateTimeZone|false'],
'DateTimeInterface::__serialize' => ['array'],
'DateTimeInterface::__unserialize' => ['void', 'data'=>'array'],
'DateTimeZone::__construct' => ['void', 'timezone'=>'string'],
'DateTimeZone::__construct' => ['void', 'timezone'=>'non-empty-string'],
'DateTimeZone::__set_state' => ['DateTimeZone', 'array'=>'array'],
'DateTimeZone::__wakeup' => ['void'],
'DateTimeZone::getLocation' => ['array|false'],
'DateTimeZone::getName' => ['string'],
'DateTimeZone::getName' => ['non-empty-string'],
'DateTimeZone::getOffset' => ['int', 'datetime'=>'DateTimeInterface'],
'DateTimeZone::getTransitions' => ['list<array{ts: int, time: string, offset: int, isdst: bool, abbr: string}>|false', 'timestampBegin='=>'int', 'timestampEnd='=>'int'],
'DateTimeZone::listAbbreviations' => ['array<string, list<array{dst: bool, offset: int, timezone_id: string|null}>>'],
Expand Down
4 changes: 2 additions & 2 deletions dictionaries/CallMap_historical.php
Original file line number Diff line number Diff line change
Expand Up @@ -847,11 +847,11 @@
'DateTimeInterface::getOffset' => ['int'],
'DateTimeInterface::getTimestamp' => ['int|false'],
'DateTimeInterface::getTimezone' => ['DateTimeZone|false'],
'DateTimeZone::__construct' => ['void', 'timezone'=>'string'],
'DateTimeZone::__construct' => ['void', 'timezone'=>'non-empty-string'],
'DateTimeZone::__set_state' => ['DateTimeZone', 'array'=>'array'],
'DateTimeZone::__wakeup' => ['void'],
'DateTimeZone::getLocation' => ['array|false'],
'DateTimeZone::getName' => ['string'],
'DateTimeZone::getName' => ['non-empty-string'],
'DateTimeZone::getOffset' => ['int|false', 'datetime'=>'DateTimeInterface'],
'DateTimeZone::getTransitions' => ['list<array{ts: int, time: string, offset: int, isdst: bool, abbr: string}>|false', 'timestampBegin='=>'int', 'timestampEnd='=>'int'],
'DateTimeZone::listAbbreviations' => ['array<string, list<array{dst: bool, offset: int, timezone_id: string|null}>>'],
Expand Down
1 change: 1 addition & 0 deletions stubs/CoreImmutableClasses.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class DateTimeImmutable implements DateTimeInterface
*/
class DateTimeZone
{
/** @param non-empty-string $timezone */
public function __construct(string $timezone) {}
}

Expand Down

0 comments on commit b4e1eeb

Please sign in to comment.