mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
Standardize serialize denying
This commit is contained in:
@ -27,6 +27,7 @@ use function preg_match;
|
||||
|
||||
trait EnumTrait{
|
||||
use RegistryTrait;
|
||||
use NotSerializable;
|
||||
|
||||
/**
|
||||
* Registers the given object as an enum member.
|
||||
@ -101,12 +102,4 @@ trait EnumTrait{
|
||||
public function __clone(){
|
||||
throw new \LogicException("Enum members cannot be cloned");
|
||||
}
|
||||
|
||||
public function __sleep(){
|
||||
throw new \LogicException("Enum members cannot be serialized");
|
||||
}
|
||||
|
||||
public function __wakeup(){
|
||||
throw new \LogicException("Enum members cannot be unserialized");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user