for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Zee\DateRange\States;
use DateTimeInterface;
use Zee\DateRange\DateRangeException;
/**
* State of the undefined range.
*/
final class UndefinedState extends RangeState
{
* {@inheritdoc}
public function getStartDate(): DateTimeInterface
throw new DateRangeException('Range start is undefined');
}
public function getEndDate(): DateTimeInterface
throw new DateRangeException('Range end is undefined');
public function setStartDate(DateTimeInterface $start): RangeState
return new InfiniteEndState($start);
public function setEndDate(DateTimeInterface $end): RangeState
return new InfiniteStartState($end);
public function formatStartDate(string $format = 'c'): ?string
return null;
public function formatEndDate(string $format = 'c'): ?string