Initial Commit
This commit is contained in:
43
dependencies/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php
vendored
Normal file
43
dependencies/nesbot/carbon/src/Carbon/Exceptions/BadComparisonUnitException.php
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use Throwable;
|
||||
class BadComparisonUnitException extends UnitException
|
||||
{
|
||||
/**
|
||||
* The unit.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $unit;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $unit
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($unit, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->unit = $unit;
|
||||
parent::__construct("Bad comparison unit: '{$unit}'", $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the unit.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUnit() : string
|
||||
{
|
||||
return $this->unit;
|
||||
}
|
||||
}
|
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php
vendored
Normal file
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/BadFluentConstructorException.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use BadMethodCallException as BaseBadMethodCallException;
|
||||
use Throwable;
|
||||
class BadFluentConstructorException extends BaseBadMethodCallException implements BadMethodCallException
|
||||
{
|
||||
/**
|
||||
* The method.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $method;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $method
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($method, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->method = $method;
|
||||
parent::__construct(\sprintf("Unknown fluent constructor '%s'.", $method), $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the method.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMethod() : string
|
||||
{
|
||||
return $this->method;
|
||||
}
|
||||
}
|
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php
vendored
Normal file
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/BadFluentSetterException.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use BadMethodCallException as BaseBadMethodCallException;
|
||||
use Throwable;
|
||||
class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException
|
||||
{
|
||||
/**
|
||||
* The setter.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $setter;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $setter
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($setter, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->setter = $setter;
|
||||
parent::__construct(\sprintf("Unknown fluent setter '%s'", $setter), $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the setter.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSetter() : string
|
||||
{
|
||||
return $this->setter;
|
||||
}
|
||||
}
|
16
dependencies/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php
vendored
Normal file
16
dependencies/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
interface BadMethodCallException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php
vendored
Normal file
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use RuntimeException as BaseRuntimeException;
|
||||
final class EndLessPeriodException extends BaseRuntimeException implements RuntimeException
|
||||
{
|
||||
//
|
||||
}
|
16
dependencies/nesbot/carbon/src/Carbon/Exceptions/Exception.php
vendored
Normal file
16
dependencies/nesbot/carbon/src/Carbon/Exceptions/Exception.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
interface Exception
|
||||
{
|
||||
//
|
||||
}
|
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php
vendored
Normal file
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/ImmutableException.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use RuntimeException as BaseRuntimeException;
|
||||
use Throwable;
|
||||
class ImmutableException extends BaseRuntimeException implements RuntimeException
|
||||
{
|
||||
/**
|
||||
* The value.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $value;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $value the immutable type/value
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($value, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->value = $value;
|
||||
parent::__construct("{$value} is immutable.", $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValue() : string
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
}
|
16
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php
vendored
Normal file
16
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidArgumentException.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
interface InvalidArgumentException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php
vendored
Normal file
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
class InvalidCastException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
//
|
||||
}
|
61
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php
vendored
Normal file
61
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
class InvalidDateException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* The invalid field.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $field;
|
||||
/**
|
||||
* The invalid value.
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
private $value;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $field
|
||||
* @param mixed $value
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($field, $value, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->field = $field;
|
||||
$this->value = $value;
|
||||
parent::__construct($field . ' : ' . $value . ' is not a valid value.', $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the invalid field.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getField()
|
||||
{
|
||||
return $this->field;
|
||||
}
|
||||
/**
|
||||
* Get the invalid value.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
}
|
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php
vendored
Normal file
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidFormatException.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
class InvalidFormatException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
//
|
||||
}
|
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php
vendored
Normal file
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidIntervalException.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
class InvalidIntervalException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
//
|
||||
}
|
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php
vendored
Normal file
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodDateException.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
class InvalidPeriodDateException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
//
|
||||
}
|
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php
vendored
Normal file
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidPeriodParameterException.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
class InvalidPeriodParameterException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
//
|
||||
}
|
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php
vendored
Normal file
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidTimeZoneException.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
class InvalidTimeZoneException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
//
|
||||
}
|
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php
vendored
Normal file
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/InvalidTypeException.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
class InvalidTypeException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
//
|
||||
}
|
45
dependencies/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php
vendored
Normal file
45
dependencies/nesbot/carbon/src/Carbon/Exceptions/NotACarbonClassException.php
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use WP_Ultimo\Dependencies\Carbon\CarbonInterface;
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* The className.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $className;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $className
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($className, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->className = $className;
|
||||
parent::__construct(\sprintf('Given class does not implement %s: %s', CarbonInterface::class, $className), $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the className.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getClassName() : string
|
||||
{
|
||||
return $this->className;
|
||||
}
|
||||
}
|
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php
vendored
Normal file
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
class NotAPeriodException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
//
|
||||
}
|
29
dependencies/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php
vendored
Normal file
29
dependencies/nesbot/carbon/src/Carbon/Exceptions/NotLocaleAwareException.php
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
class NotLocaleAwareException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param mixed $object
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($object, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$dump = \is_object($object) ? \get_class($object) : \gettype($object);
|
||||
parent::__construct("{$dump} does neither implements Symfony\\Contracts\\Translation\\LocaleAwareInterface nor getLocale() method.", $code, $previous);
|
||||
}
|
||||
}
|
89
dependencies/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php
vendored
Normal file
89
dependencies/nesbot/carbon/src/Carbon/Exceptions/OutOfRangeException.php
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
// This will extends OutOfRangeException instead of InvalidArgumentException since 3.0.0
|
||||
// use OutOfRangeException as BaseOutOfRangeException;
|
||||
class OutOfRangeException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* The unit or name of the value.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $unit;
|
||||
/**
|
||||
* The range minimum.
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
private $min;
|
||||
/**
|
||||
* The range maximum.
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
private $max;
|
||||
/**
|
||||
* The invalid value.
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
private $value;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $unit
|
||||
* @param mixed $min
|
||||
* @param mixed $max
|
||||
* @param mixed $value
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($unit, $min, $max, $value, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->unit = $unit;
|
||||
$this->min = $min;
|
||||
$this->max = $max;
|
||||
$this->value = $value;
|
||||
parent::__construct("{$unit} must be between {$min} and {$max}, {$value} given", $code, $previous);
|
||||
}
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getMax()
|
||||
{
|
||||
return $this->max;
|
||||
}
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getMin()
|
||||
{
|
||||
return $this->min;
|
||||
}
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getUnit()
|
||||
{
|
||||
return $this->unit;
|
||||
}
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
}
|
78
dependencies/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php
vendored
Normal file
78
dependencies/nesbot/carbon/src/Carbon/Exceptions/ParseErrorException.php
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
class ParseErrorException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* The expected.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $expected;
|
||||
/**
|
||||
* The actual.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $actual;
|
||||
/**
|
||||
* The help message.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $help;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $expected
|
||||
* @param string $actual
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($expected, $actual, $help = '', $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->expected = $expected;
|
||||
$this->actual = $actual;
|
||||
$this->help = $help;
|
||||
$actual = $actual === '' ? 'data is missing' : "get '{$actual}'";
|
||||
parent::__construct(\trim("Format expected {$expected} but {$actual}\n{$help}"), $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the expected.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExpected() : string
|
||||
{
|
||||
return $this->expected;
|
||||
}
|
||||
/**
|
||||
* Get the actual.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getActual() : string
|
||||
{
|
||||
return $this->actual;
|
||||
}
|
||||
/**
|
||||
* Get the help message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHelp() : string
|
||||
{
|
||||
return $this->help;
|
||||
}
|
||||
}
|
16
dependencies/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php
vendored
Normal file
16
dependencies/nesbot/carbon/src/Carbon/Exceptions/RuntimeException.php
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
interface RuntimeException extends Exception
|
||||
{
|
||||
//
|
||||
}
|
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnitException.php
vendored
Normal file
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnitException.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
class UnitException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
//
|
||||
}
|
43
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php
vendored
Normal file
43
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnitNotConfiguredException.php
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use Throwable;
|
||||
class UnitNotConfiguredException extends UnitException
|
||||
{
|
||||
/**
|
||||
* The unit.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $unit;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $unit
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($unit, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->unit = $unit;
|
||||
parent::__construct("Unit {$unit} have no configuration to get total from other units.", $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the unit.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUnit() : string
|
||||
{
|
||||
return $this->unit;
|
||||
}
|
||||
}
|
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php
vendored
Normal file
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnknownGetterException.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
class UnknownGetterException extends BaseInvalidArgumentException implements InvalidArgumentException
|
||||
{
|
||||
/**
|
||||
* The getter.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $getter;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $getter getter name
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($getter, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->getter = $getter;
|
||||
parent::__construct("Unknown getter '{$getter}'", $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the getter.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getGetter() : string
|
||||
{
|
||||
return $this->getter;
|
||||
}
|
||||
}
|
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php
vendored
Normal file
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnknownMethodException.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use BadMethodCallException as BaseBadMethodCallException;
|
||||
use Throwable;
|
||||
class UnknownMethodException extends BaseBadMethodCallException implements BadMethodCallException
|
||||
{
|
||||
/**
|
||||
* The method.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $method;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $method
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($method, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->method = $method;
|
||||
parent::__construct("Method {$method} does not exist.", $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the method.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMethod() : string
|
||||
{
|
||||
return $this->method;
|
||||
}
|
||||
}
|
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php
vendored
Normal file
44
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnknownSetterException.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use InvalidArgumentException as BaseInvalidArgumentException;
|
||||
use Throwable;
|
||||
class UnknownSetterException extends BaseInvalidArgumentException implements BadMethodCallException
|
||||
{
|
||||
/**
|
||||
* The setter.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $setter;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $setter setter name
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($setter, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->setter = $setter;
|
||||
parent::__construct("Unknown setter '{$setter}'", $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the setter.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSetter() : string
|
||||
{
|
||||
return $this->setter;
|
||||
}
|
||||
}
|
43
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php
vendored
Normal file
43
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnknownUnitException.php
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use Throwable;
|
||||
class UnknownUnitException extends UnitException
|
||||
{
|
||||
/**
|
||||
* The unit.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $unit;
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param string $unit
|
||||
* @param int $code
|
||||
* @param Throwable|null $previous
|
||||
*/
|
||||
public function __construct($unit, $code = 0, Throwable $previous = null)
|
||||
{
|
||||
$this->unit = $unit;
|
||||
parent::__construct("Unknown unit '{$unit}'.", $code, $previous);
|
||||
}
|
||||
/**
|
||||
* Get the unit.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getUnit() : string
|
||||
{
|
||||
return $this->unit;
|
||||
}
|
||||
}
|
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php
vendored
Normal file
17
dependencies/nesbot/carbon/src/Carbon/Exceptions/UnreachableException.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of the Carbon package.
|
||||
*
|
||||
* (c) Brian Nesbitt <brian@nesbot.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
namespace WP_Ultimo\Dependencies\Carbon\Exceptions;
|
||||
|
||||
use RuntimeException as BaseRuntimeException;
|
||||
class UnreachableException extends BaseRuntimeException implements RuntimeException
|
||||
{
|
||||
//
|
||||
}
|
Reference in New Issue
Block a user