1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

add createFromInterface in PHP 8 (#5055)

This commit is contained in:
orklah 2021-01-19 23:22:25 +01:00 committed by Daniil Gentili
parent 204582be52
commit 5eb4d88f1a
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 4 additions and 0 deletions

View File

@ -1774,6 +1774,7 @@ return [
'DateTime::add' => ['static', 'interval'=>'DateInterval'], 'DateTime::add' => ['static', 'interval'=>'DateInterval'],
'DateTime::createFromFormat' => ['static|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'?DateTimeZone'], 'DateTime::createFromFormat' => ['static|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'?DateTimeZone'],
'DateTime::createFromImmutable' => ['static', 'datetTimeImmutable'=>'DateTimeImmutable'], 'DateTime::createFromImmutable' => ['static', 'datetTimeImmutable'=>'DateTimeImmutable'],
'DateTime::createFromInterface' => ['DateTimeInterface', 'self'],
'DateTime::diff' => ['DateInterval|false', 'datetime2'=>'DateTimeInterface', 'absolute='=>'bool'], 'DateTime::diff' => ['DateInterval|false', 'datetime2'=>'DateTimeInterface', 'absolute='=>'bool'],
'DateTime::format' => ['string|false', 'format'=>'string'], 'DateTime::format' => ['string|false', 'format'=>'string'],
'DateTime::getLastErrors' => ['array{warning_count:int,warnings:array<int,string>,error_count:int,errors:array<int,string>}'], 'DateTime::getLastErrors' => ['array{warning_count:int,warnings:array<int,string>,error_count:int,errors:array<int,string>}'],
@ -1793,6 +1794,7 @@ return [
'DateTimeImmutable::__wakeup' => ['void'], 'DateTimeImmutable::__wakeup' => ['void'],
'DateTimeImmutable::add' => ['static', 'interval'=>'DateInterval'], 'DateTimeImmutable::add' => ['static', 'interval'=>'DateInterval'],
'DateTimeImmutable::createFromFormat' => ['static|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'?DateTimeZone'], 'DateTimeImmutable::createFromFormat' => ['static|false', 'format'=>'string', 'time'=>'string', 'timezone='=>'?DateTimeZone'],
'DateTimeImmutable::createFromInterface' => ['DateTimeInterface', 'self'],
'DateTimeImmutable::createFromMutable' => ['static', 'datetime'=>'DateTime'], 'DateTimeImmutable::createFromMutable' => ['static', 'datetime'=>'DateTime'],
'DateTimeImmutable::diff' => ['DateInterval', 'datetime2'=>'DateTimeInterface', 'absolute='=>'bool'], 'DateTimeImmutable::diff' => ['DateInterval', 'datetime2'=>'DateTimeInterface', 'absolute='=>'bool'],
'DateTimeImmutable::format' => ['string|false', 'format'=>'string'], 'DateTimeImmutable::format' => ['string|false', 'format'=>'string'],

View File

@ -50,6 +50,8 @@ return [
'curl_share_init' => ['CurlShareHandle'], 'curl_share_init' => ['CurlShareHandle'],
'curl_share_setopt' => ['bool', 'sh'=>'CurlShareHandle', 'option'=>'int', 'value'=>'mixed'], 'curl_share_setopt' => ['bool', 'sh'=>'CurlShareHandle', 'option'=>'int', 'value'=>'mixed'],
'curl_unescape' => ['string|false', 'ch'=>'CurlShareHandle', 'string'=>'string'], 'curl_unescape' => ['string|false', 'ch'=>'CurlShareHandle', 'string'=>'string'],
'DateTime::createFromInterface' => ['DateTimeInterface', 'self'],
'DateTimeImmutable::createFromInterface' => ['DateTimeInterface', 'self'],
'date_add' => ['DateTime', 'object'=>'DateTime', 'interval'=>'DateInterval'], 'date_add' => ['DateTime', 'object'=>'DateTime', 'interval'=>'DateInterval'],
'date_date_set' => ['DateTime', 'object'=>'DateTime', 'year'=>'int', 'month'=>'int', 'day'=>'int'], 'date_date_set' => ['DateTime', 'object'=>'DateTime', 'year'=>'int', 'month'=>'int', 'day'=>'int'],
'date_diff' => ['DateInterval', 'obj1'=>'DateTimeInterface', 'obj2'=>'DateTimeInterface', 'absolute='=>'bool'], 'date_diff' => ['DateInterval', 'obj1'=>'DateTimeInterface', 'obj2'=>'DateTimeInterface', 'absolute='=>'bool'],