mailpoet
/
vendor-prefixed
/
nesbot
/
carbon
/
src
/
Carbon
/
Exceptions
/
BadComparisonUnitException.php
BadComparisonUnitException.php
3 years ago
BadFluentConstructorException.php
3 years ago
BadFluentSetterException.php
3 years ago
BadMethodCallException.php
3 years ago
EndLessPeriodException.php
3 years ago
Exception.php
3 years ago
ImmutableException.php
3 years ago
InvalidArgumentException.php
3 years ago
InvalidCastException.php
3 years ago
InvalidDateException.php
3 years ago
InvalidFormatException.php
3 years ago
InvalidIntervalException.php
3 years ago
InvalidPeriodDateException.php
3 years ago
InvalidPeriodParameterException.php
3 years ago
InvalidTimeZoneException.php
3 years ago
InvalidTypeException.php
3 years ago
NotACarbonClassException.php
3 years ago
NotAPeriodException.php
3 years ago
NotLocaleAwareException.php
3 years ago
OutOfRangeException.php
3 years ago
ParseErrorException.php
3 years ago
RuntimeException.php
3 years ago
UnitException.php
3 years ago
UnitNotConfiguredException.php
3 years ago
UnknownGetterException.php
3 years ago
UnknownMethodException.php
3 years ago
UnknownSetterException.php
3 years ago
UnknownUnitException.php
3 years ago
UnreachableException.php
3 years ago
index.php
3 years ago
BadComparisonUnitException.php
18 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Carbon\Exceptions; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use Throwable; |
| 5 | class BadComparisonUnitException extends UnitException |
| 6 | { |
| 7 | protected $unit; |
| 8 | public function __construct($unit, $code = 0, Throwable $previous = null) |
| 9 | { |
| 10 | $this->unit = $unit; |
| 11 | parent::__construct("Bad comparison unit: '{$unit}'", $code, $previous); |
| 12 | } |
| 13 | public function getUnit() : string |
| 14 | { |
| 15 | return $this->unit; |
| 16 | } |
| 17 | } |
| 18 |