src/Entity/DataTransferObjects/DtoFactory.php
private function setId(DataTransferObjectInterface $dto): void
    {
        $entityFqn  = $dto::getEntityFqn();
        $reflection = $this->getDsmFromEntityFqn($entityFqn)
                           ->getReflectionClass();
        if ($reflection->implementsInterface(UuidPrimaryKeyInterface::class)) {
            $dto->setId($entityFqn::buildUuid($this->uuidFactory));
        }
    }
private function setId(DataTransferObjectInterface $dto): void
    {
        $entityFqn  = $dto::getEntityFqn();
        $reflection = $this->getDsmFromEntityFqn($entityFqn)
                           ->getReflectionClass();
        if ($reflection->implementsInterface(UuidPrimaryKeyInterface::class)) {
            $dto->setId($entityFqn::buildUuid($this->uuidFactory));
        }
    }
private function setId ( DataTransferObjectInterface $ dto ) : void { $ entityFqn = $ dto :: getEntityFqn ( ) ; $ reflection = $ this -> getDsmFromEntityFqn ( $ entityFqn ) -> getReflectionClass ( ) ; if ( $ reflection -> implementsInterface ( UuidPrimaryKeyInterface :: class ) ) { $ dto -> setId ( $ entityFqn :: buildUuid ( $ this -> uuidFactory ) ) ; } }
If the Entity that the DTO represents has a settable and buildable UUID, then we should set that at the point of
creating a DTO for a new Entity instance

@param DataTransferObjectInterface $dto
If the Entity that the DTO represents has a settable and buildable UUID then we should set that at the point of creating a DTO for a new Entity instance