protected function replaceVersion(string &$stub, string $version)
    {

        if (strlen($version) > 0)
            $stub = str_replace('v1', $version, $stub);

        return $this;
    }
protected function replaceVersion(string &$stub, string $version)
    {

        if (strlen($version) > 0)
            $stub = str_replace('v1', $version, $stub);

        return $this;
    }
protected function replaceVersion ( string & $ stub , string $ version ) { if ( strlen ( $ version ) > 0 ) $ stub = str_replace ( 'v1' , $ version , $ stub ) ; return $ this ; }
Replace the endpoint version for the given stub.

@param string $stub
@param string $version

@return $this
Replace the endpoint version for the given stub .