original_string: public static function parseHomeDir(string $path): string
      {
          if (isset($_SERVER['HOME'])) {
              $path = str_replace('~', $_SERVER['HOME'], $path);
          } elseif (isset($_SERVER['HOMEDRIVE'], $_SERVER['HOMEPATH'])) {
              $path = str_replace('~', $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'], $path);
          }
  
          return $path;
      }
code: public static function parseHomeDir(string $path): string
      {
          if (isset($_SERVER['HOME'])) {
              $path = str_replace('~', $_SERVER['HOME'], $path);
          } elseif (isset($_SERVER['HOMEDRIVE'], $_SERVER['HOMEPATH'])) {
              $path = str_replace('~', $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH'], $path);
          }
  
          return $path;
      }
code_tokens: public static function parseHomeDir ( string $ path ) : string { if ( isset ( $ _SERVER [ 'HOME' ] ) ) { $ path = str_replace ( '~' , $ _SERVER [ 'HOME' ] , $ path ) ; } elseif ( isset ( $ _SERVER [ 'HOMEDRIVE' ] , $ _SERVER [ 'HOMEPATH' ] ) ) { $ path = str_replace ( '~' , $ _SERVER [ 'HOMEDRIVE' ] . $ _SERVER [ 'HOMEPATH' ] , $ path ) ; } return $ path ; }
docstring: Parse "~" symbol from path.
  
  @param string $path
  @return string
docstring_tokens: Parse ~ symbol from path .