Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • sibidharan/api-development-course-apr-2021
  • krithikramraja/api-development-course-apr-2021
  • monish-palanikumar/api-development-course-apr-2021
  • Pranesh/api-development-course-apr-2021
  • ganesha005/api-development-course-apr-2021
  • selva1011/api-development-course-apr-2021
  • hema/api-development-course-apr-2021
  • Kartheeekn/api-development-course-apr-2021
  • GopiKrishnan/api-development-course-apr-2021
  • Mhd_khalid/api-development-course-apr-2021
  • sibivarma/api-development-course-apr-2021
  • ramanajsr1/api-development-course-apr-2021
  • rahulprem2k2910/api-development-course-apr-2021
  • sabarinathanfb/api-development-course-apr-2021
  • hariharanrd/api-development-course-apr-2021
  • Akram24/api-development-course-apr-2021
  • At_muthu__/api-development-course-apr-2021
  • rii/api-development-course-apr-2021
  • harishvarmaj7/api-development-course-apr-2021
  • moovendhan/rest-api
  • k3XD16/api-development-course-apr-2021
  • vimal/api-development-course-apr-2021
  • shiva007/api-development-course-apr-2021
  • Amudhan/api-development-course-apr-2021
  • abinayacyber604/api-development-course-apr-2021
  • subash_19/api
  • Saransaran/api-development-course-apr-2021
27 results
Show changes
Showing
with 637 additions and 0 deletions
<?php
/**
* Thanks to https://github.com/flaushi for his suggestion:
* https://github.com/doctrine/dbal/issues/2873#issuecomment-534956358
*/
namespace Carbon\Doctrine;
use Doctrine\DBAL\Types\VarDateTimeType;
class DateTimeType extends VarDateTimeType implements CarbonDoctrineType
{
use CarbonTypeConverter;
}
<?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 Carbon\Exceptions;
use Exception;
class BadComparisonUnitException extends UnitException
{
/**
* Constructor.
*
* @param string $unit
* @param int $code
* @param Exception|null $previous
*/
public function __construct($unit, $code = 0, Exception $previous = null)
{
parent::__construct("Bad comparison unit: '$unit'", $code, $previous);
}
}
<?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 Carbon\Exceptions;
use BadMethodCallException as BaseBadMethodCallException;
use Exception;
class BadFluentConstructorException extends BaseBadMethodCallException implements BadMethodCallException
{
/**
* Constructor.
*
* @param string $method
* @param int $code
* @param Exception|null $previous
*/
public function __construct($method, $code = 0, Exception $previous = null)
{
parent::__construct(sprintf("Unknown fluent constructor '%s'.", $method), $code, $previous);
}
}
<?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 Carbon\Exceptions;
use BadMethodCallException as BaseBadMethodCallException;
use Exception;
class BadFluentSetterException extends BaseBadMethodCallException implements BadMethodCallException
{
/**
* Constructor.
*
* @param string $method
* @param int $code
* @param Exception|null $previous
*/
public function __construct($method, $code = 0, Exception $previous = null)
{
parent::__construct(sprintf("Unknown fluent setter '%s'", $method), $code, $previous);
}
}
<?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 Carbon\Exceptions;
interface BadMethodCallException extends Exception
{
}
<?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 Carbon\Exceptions;
interface Exception
{
}
<?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 Carbon\Exceptions;
use Exception;
use RuntimeException as BaseRuntimeException;
class ImmutableException extends BaseRuntimeException implements RuntimeException
{
/**
* Constructor.
*
* @param string $value the immutable type/value
* @param int $code
* @param Exception|null $previous
*/
public function __construct($value, $code = 0, Exception $previous = null)
{
parent::__construct("$value is immutable.", $code, $previous);
}
}
<?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 Carbon\Exceptions;
interface InvalidArgumentException extends Exception
{
}
<?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 Carbon\Exceptions;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidCastException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* Constructor.
*
* @param string $message
* @param int $code
* @param Exception|null $previous
*/
public function __construct($message, $code = 0, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
<?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 Carbon\Exceptions;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
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 Exception|null $previous
*/
public function __construct($field, $value, $code = 0, Exception $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;
}
}
<?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 Carbon\Exceptions;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidFormatException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* Constructor.
*
* @param string $message
* @param int $code
* @param Exception|null $previous
*/
public function __construct($message, $code = 0, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
<?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 Carbon\Exceptions;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidIntervalException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* Constructor.
*
* @param string $message
* @param int $code
* @param Exception|null $previous
*/
public function __construct($message, $code = 0, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
<?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 Carbon\Exceptions;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidPeriodDateException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* Constructor.
*
* @param string $message
* @param int $code
* @param Exception|null $previous
*/
public function __construct($message, $code = 0, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
<?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 Carbon\Exceptions;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidPeriodParameterException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* Constructor.
*
* @param string $message
* @param int $code
* @param Exception|null $previous
*/
public function __construct($message, $code = 0, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
<?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 Carbon\Exceptions;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidTimeZoneException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* Constructor.
*
* @param string $message
* @param int $code
* @param Exception|null $previous
*/
public function __construct($message, $code = 0, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
<?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 Carbon\Exceptions;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
class InvalidTypeException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* Constructor.
*
* @param string $message
* @param int $code
* @param Exception|null $previous
*/
public function __construct($message, $code = 0, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
<?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 Carbon\Exceptions;
use Carbon\CarbonInterface;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
class NotACarbonClassException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* Constructor.
*
* @param string $className
* @param int $code
* @param Exception|null $previous
*/
public function __construct($className, $code = 0, Exception $previous = null)
{
parent::__construct(sprintf(
'Given class does not implement %s: %s',
CarbonInterface::class,
$className
), $code, $previous);
}
}
<?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 Carbon\Exceptions;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
class NotAPeriodException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* Constructor.
*
* @param string $message
* @param int $code
* @param Exception|null $previous
*/
public function __construct($message, $code = 0, Exception $previous = null)
{
parent::__construct($message, $code, $previous);
}
}
<?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 Carbon\Exceptions;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
class NotLocaleAwareException extends BaseInvalidArgumentException implements InvalidArgumentException
{
/**
* Constructor.
*
* @param mixed $object
* @param int $code
* @param Exception|null $previous
*/
public function __construct($object, $code = 0, Exception $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);
}
}
<?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 Carbon\Exceptions;
use Exception;
use InvalidArgumentException as BaseInvalidArgumentException;
// 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 Exception|null $previous
*/
public function __construct($unit, $min, $max, $value, $code = 0, Exception $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;
}
}