Skip to content

Commit

Permalink
fix: remove \ from DateTimeZone in functionMap
Browse files Browse the repository at this point in the history
This causes issue in thecodingmachine/safe as their generator takes phpstan's fcnmap and generates function signatures. However, now it generates e.g. `function date_create_immutable(string $datetime = "now", ?\\DateTimeZone $timezone = null): \DateTimeImmutable`. Therefore, this fix is needed.
  • Loading branch information
simPod committed Oct 23, 2023
1 parent 80ce9a4 commit 385959e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resources/functionMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1534,10 +1534,10 @@
'cyrus_unbind' => ['bool', 'connection'=>'resource', 'trigger_name'=>'string'],
'date' => ['string', 'format'=>'string', 'timestamp='=>'int'],
'date_add' => ['DateTime|false', 'object'=>'', 'interval'=>''],
'date_create' => ['DateTime|false', 'time='=>'string|null', 'timezone='=>'?\DateTimeZone'],
'date_create_from_format' => ['DateTime|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'?\DateTimeZone'],
'date_create_immutable' => ['DateTimeImmutable|false', 'time='=>'string', 'timezone='=>'?\DateTimeZone'],
'date_create_immutable_from_format' => ['DateTimeImmutable|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'?\DateTimeZone'],
'date_create' => ['DateTime|false', 'time='=>'string|null', 'timezone='=>'?DateTimeZone'],
'date_create_from_format' => ['DateTime|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'?DateTimeZone'],
'date_create_immutable' => ['DateTimeImmutable|false', 'time='=>'string', 'timezone='=>'?DateTimeZone'],
'date_create_immutable_from_format' => ['DateTimeImmutable|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'?DateTimeZone'],
'date_date_set' => ['DateTime|false', 'object'=>'', 'year'=>'', 'month'=>'', 'day'=>''],
'date_default_timezone_get' => ['string'],
'date_default_timezone_set' => ['bool', 'timezone_identifier'=>'string'],
Expand Down

0 comments on commit 385959e

Please sign in to comment.