edbizarro/laravel-facebook-ads

View on GitHub
src/Exceptions/InvalidPeriod.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Edbizarro\LaravelFacebookAds\Exceptions;

use DateTime;
use Exception;

class InvalidPeriod extends Exception
{
    public static function startDateCannotBeAfterEndDate(DateTime $startDate, DateTime $endDate)
    {
        return new static("Start date `{$startDate->format('Y-m-d')}` cannot be after end date `{$endDate->format('Y-m-d')}`.");
    }
}