for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace Arbor\Moment\Exception;
use Arbor\Moment\DateTime;
use Arbor\Moment\Time;
/**
* Class InvalidArgumentException
*
* @package Arbor\Moment\Exception
* @author Igor Vuckovic <[email protected]>
*/
class InvalidArgumentException extends \InvalidArgumentException
{
* @param DateTime $startDate
* @param DateTime $endDate
* @return InvalidArgumentException
public static function startDateNotBeforeEndDate(DateTime $startDate, DateTime $endDate) : InvalidArgumentException
return new self(sprintf(
'Start date "%s" in date range must be before the end date "%s"',
$startDate->getLong(), $endDate->getLong()
));
}
* @param string|int $time
public static function invalidTimeFormat($time) : InvalidArgumentException
'Invalid time format "%s" provided as argument for "%s"', $time, Time::class
public static function dateRangeWithoutBoundaries() : InvalidArgumentException
'Date Range must have either %s or %s defined',
'$startDate', '$endDate'