original_string: protected function getTermRelativePath($basePath, $permalinkTemplate, $term)
      {
          $result = $basePath;
          $slugedTerm = (new StringWrapper($term))->slug();
          $result .= '/'.str_replace(':name', $slugedTerm, $permalinkTemplate).'/index.html';
  
          return ltrim(preg_replace('/\/\/+/', '/', $result), '/');
      }
code: protected function getTermRelativePath($basePath, $permalinkTemplate, $term)
      {
          $result = $basePath;
          $slugedTerm = (new StringWrapper($term))->slug();
          $result .= '/'.str_replace(':name', $slugedTerm, $permalinkTemplate).'/index.html';
  
          return ltrim(preg_replace('/\/\/+/', '/', $result), '/');
      }
code_tokens: protected function getTermRelativePath ( $ basePath , $ permalinkTemplate , $ term ) { $ result = $ basePath ; $ slugedTerm = ( new StringWrapper ( $ term ) ) -> slug ( ) ; $ result .= '/' . str_replace ( ':name' , $ slugedTerm , $ permalinkTemplate ) . '/index.html' ; return ltrim ( preg_replace ( '/\/\/+/' , '/' , $ result ) , '/' ) ; }
docstring: Returns the relative path of a term.
  
  @param string $basePath          The base path
  @param string $permalinkTemplate The template of the permalink that will be applied
  @param string $term              The term
  
  @return string
docstring_tokens: Returns the relative path of a term .