src/CodeGeneration/Creation/AbstractCreator.php
public function writeIfNotExists(): string
    {
        if ($this->targetFile->exists()) {
            return $this->targetFile->getPath();
        }

        return $this->write();
    }
public function writeIfNotExists(): string
    {
        if ($this->targetFile->exists()) {
            return $this->targetFile->getPath();
        }

        return $this->write();
    }
public function writeIfNotExists ( ) : string { if ( $ this -> targetFile -> exists ( ) ) { return $ this -> targetFile -> getPath ( ) ; } return $ this -> write ( ) ; }
Write the file only if it doesn't already exist

@return string
@throws \EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException
Write the file only if it doesn t already exist