Skip to content

Commit

Permalink
Add link to Psalm issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bdsl committed Nov 11, 2020
1 parent 5219eed commit fd52bf4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/ZonedDateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,7 @@ public static function fromDateTime(\DateTimeInterface $dateTime) : ZonedDateTim
$dateTimeZone = $dateTime->getTimezone();

/**
* @psalm-suppress TypeDoesNotContainType
*
* Looks like Psalm might have a wrong return type for \DateTimeInterface::getTimeZone - it should
* be \DateTimeZone|false . Psalm seems to think it's just \DateTimeZone
* @psalm-suppress TypeDoesNotContainTyp - see https://github.com/vimeo/psalm/issues/4515
*/
if ($dateTimeZone === false) {
throw new DateTimeException('This DateTime object has no timezone.');
Expand Down

0 comments on commit fd52bf4

Please sign in to comment.