diff --git a/src/Metadata/AggregateRoot/ClassIsNotAnAggregate.php b/src/Metadata/AggregateRoot/ClassIsNotAnAggregate.php index 4cf9b48f8..6934c60da 100644 --- a/src/Metadata/AggregateRoot/ClassIsNotAnAggregate.php +++ b/src/Metadata/AggregateRoot/ClassIsNotAnAggregate.php @@ -8,4 +8,11 @@ final class ClassIsNotAnAggregate extends MetadataException { + /** + * @param class-string $class + */ + public function __construct(string $class) + { + parent::__construct(sprintf('class %s is not an aggregate root', $class)); + } } diff --git a/src/Metadata/Event/ClassIsNotAnEvent.php b/src/Metadata/Event/ClassIsNotAnEvent.php index 76a77c2a7..3d4f601cf 100644 --- a/src/Metadata/Event/ClassIsNotAnEvent.php +++ b/src/Metadata/Event/ClassIsNotAnEvent.php @@ -8,4 +8,11 @@ final class ClassIsNotAnEvent extends MetadataException { + /** + * @param class-string $class + */ + public function __construct(string $class) + { + parent::__construct(sprintf('class %s is not an event', $class)); + } }