Bug report
When using the DatePeriod object, I am dealing with many errors at the same time that cannot be easily fixed.
Code snippet that reproduces the problem
https://phpstan.org/r/d8c2c1e8-1bab-410d-90bf-252709b5eab4
return new \DatePeriod(
start: new \DateTime('now'),
interval: new \DateInterval('P1D'),
end: new \DateTime('now + 3 days'),
);

Expected output
The DatePeriod object can use 3 possible constructors with named arguments and different types: https://www.php.net/manual/en/dateperiod.construct.php
public DatePeriod::__construct(
DateTimeInterface $start,
DateInterval $interval,
int $recurrences,
int $options = 0
);
public DatePeriod::__construct(
DateTimeInterface $start,
DateInterval $interval,
DateTimeInterface $end,
int $options = 0
);
public DatePeriod::__construct(string $isostr, int $options = 0);
Did PHPStan help you today? Did it make you happy in any way?
I really love PhpStan!
Thanks!
Bug report
When using the
DatePeriodobject, I am dealing with many errors at the same time that cannot be easily fixed.Code snippet that reproduces the problem
https://phpstan.org/r/d8c2c1e8-1bab-410d-90bf-252709b5eab4
Expected output
The
DatePeriodobject can use 3 possible constructors with named arguments and different types: https://www.php.net/manual/en/dateperiod.construct.phpDid PHPStan help you today? Did it make you happy in any way?
I really love PhpStan!
Thanks!