mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
fix #7747: DateInterval::createFromDateString can be false
This commit is contained in:
parent
d24b32bb05
commit
a57bb1f128
@ -1762,7 +1762,7 @@ return [
|
||||
'DateInterval::__construct' => ['void', 'spec'=>'string'],
|
||||
'DateInterval::__set_state' => ['DateInterval', 'array'=>'array'],
|
||||
'DateInterval::__wakeup' => ['void'],
|
||||
'DateInterval::createFromDateString' => ['DateInterval', 'time'=>'string'],
|
||||
'DateInterval::createFromDateString' => ['DateInterval|false', 'time'=>'string'],
|
||||
'DateInterval::format' => ['string', 'format'=>'string'],
|
||||
'DatePeriod::__construct' => ['void', 'start'=>'DateTimeInterface', 'interval'=>'DateInterval', 'recur'=>'int', 'options='=>'int'],
|
||||
'DatePeriod::__construct\'1' => ['void', 'start'=>'DateTimeInterface', 'interval'=>'DateInterval', 'end'=>'DateTimeInterface', 'options='=>'int'],
|
||||
|
@ -904,6 +904,11 @@ class ValueTest extends TestCase
|
||||
if (empty($s)) {}
|
||||
}',
|
||||
],
|
||||
'falseDateInterval' => [
|
||||
'<?php
|
||||
$interval = \DateInterval::createFromDateString("30 дней");
|
||||
if ($interval === false) {}',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user