for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Dont;
use Dont\Exception\NonSerialisableObject;
use Dont\Exception\TypeError;
trait DontSerialise
{
/**
* @throws NonSerialisableObject
* @throws TypeError
*/
final public function __sleep() : void
throw NonSerialisableObject::fromAttemptedSerialisation($this);
}
final public function __serialize() : void
final public function serialize() : void