for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Event Sourcing implementation module.
*
* @author Maksim Masiukevich <[email protected]>
* @license MIT
* @license https://opensource.org/licenses/MIT
*/
declare(strict_types = 1);
namespace ServiceBus\EventSourcingModule\Exceptions;
use ServiceBus\EventSourcing\AggregateId;
final class DuplicateAggregate extends \InvalidArgumentException
{
* @param AggregateId $id
* @return self
public static function create(AggregateId $id): self
return new self(
\sprintf('Aggregate with ID "%s" already exists', $id)
);
}