src/Aggregate/AggregateType.php
public static function fromString(string $aggregateTypeString): AggregateType
    {
        if (empty($aggregateTypeString)) {
            throw new Exception\InvalidArgumentException('AggregateType must be a non empty string');
        }

        $self = new static();
        $self->aggregateType = $aggregateTypeString;

        return $self;
    }
public static function fromString(string $aggregateTypeString): AggregateType
    {
        if (empty($aggregateTypeString)) {
            throw new Exception\InvalidArgumentException('AggregateType must be a non empty string');
        }

        $self = new static();
        $self->aggregateType = $aggregateTypeString;

        return $self;
    }
public static function fromString ( string $ aggregateTypeString ) : AggregateType { if ( empty ( $ aggregateTypeString ) ) { throw new Exception \ InvalidArgumentException ( 'AggregateType must be a non empty string' ) ; } $ self = new static ( ) ; $ self -> aggregateType = $ aggregateTypeString ; return $ self ; }
Use this factory when the aggregate type is not equal to the aggregate root class

@throws Exception\InvalidArgumentException
Use this factory when the aggregate type is not equal to the aggregate root class