src/Entity/Fields/Traits/PrimaryKey/AbstractUuidFieldTrait.php
public function injectUuid(UuidFactory $uuidFactory)
    {
        if (null === $this->id) {
            $this->setId(self::buildUuid($uuidFactory));
        }
    }
public function injectUuid(UuidFactory $uuidFactory)
    {
        if (null === $this->id) {
            $this->setId(self::buildUuid($uuidFactory));
        }
    }
public function injectUuid ( UuidFactory $ uuidFactory ) { if ( null === $ this -> id ) { $ this -> setId ( self :: buildUuid ( $ uuidFactory ) ) ; } }
This is leveraging the setter injection that happens on Entity creation to ensure that the UUID is set

@param UuidFactory $uuidFactory
This is leveraging the setter injection that happens on Entity creation to ensure that the UUID is set