PHPDoc on CarbonImmutable::createFromFormat
incompatible with actual return type
#2945
Milestone
CarbonImmutable::createFromFormat
incompatible with actual return type
#2945
Carbon 3.0.2
The phpdoc annotation here:
Carbon/src/Carbon/CarbonImmutable.php
Line 819 in cc73388
is incompatible with the actual return type from the
Creator
trait:Carbon/src/Carbon/Traits/Creator.php
Lines 630 to 642 in cc73388
If you have static analysis tools that trust the phpdoc annotations (i.e. phpstan), it'll throw that a comparison against
null
is invalid, even though the actual returned value can benull
.The text was updated successfully, but these errors were encountered: