Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/Enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ final public function __sleep()
throw new LogicException('Serialization is not supported by default in this pseudo-enum implementation');
}

/**
* @throws LogicException Serialization is not supported by default in this pseudo-enum implementation
*
* @return array<string, mixed>
*/
public function __serialize(): array
{
throw new LogicException('Serialization is not supported by default in this pseudo-enum implementation');
}

/**
* @throws LogicException Serialization is not supported by default in this pseudo-enum implementation
*
Expand All @@ -106,6 +116,16 @@ final public function __wakeup()
throw new LogicException('Serialization is not supported by default in this pseudo-enum implementation');
}

/**
* @throws LogicException Serialization is not supported by default in this pseudo-enum implementation
*
* @param array<string, mixed> $data
*/
public function __unserialize(array $data): void
{
throw new LogicException('Serialization is not supported by default in this pseudo-enum implementation');
}

/**
* Get the value of the enumerator
*
Expand Down