for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace Igni\Storage\Exception;
class UnitOfWorkException extends StorageException
{
public static function forPersistingEntityInInvalidState($entity): UnitOfWorkException
$entity = get_class($entity);
return new self("Cannot persist entity {$entity} which is in detached or removed state");
}