for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Akizuki\enum\Exceptions;
use LogicException;
/**
* [ Exception ] Enum Constant Type Exception
*
* This exception will be thrown when invalid constant is defined in enum class.
* Enum constants must be int or string.
* @author 4kizuki <[email protected]>
* @copyright 2017 4kizuki. All Rights Reserved.
* @package 4kizuki/php-enum
* @since 1.0.0
*/
class EnumConstantTypeException extends LogicException {
public function __construct( string $className, string $constName, string $constType ) {
parent::__construct( "Disallowed constant \"{$className}::{$constName}\": \"{$constType}\"." );
}