Standardize clone denying

This commit is contained in:
Dylan K. Taylor
2021-09-03 21:07:39 +01:00
parent b026ada489
commit 62435fe935
2 changed files with 32 additions and 4 deletions

View File

@ -27,6 +27,7 @@ use function preg_match;
trait EnumTrait{
use RegistryTrait;
use NotCloneable;
use NotSerializable;
/**
@ -98,8 +99,4 @@ trait EnumTrait{
public function equals(self $other) : bool{
return $this->enumName === $other->enumName;
}
public function __clone(){
throw new \LogicException("Enum members cannot be cloned");
}
}