original_string: protected function realPath($path)
      {
          if (php_sapi_name() == 'cli' && ! $path) {
              $path = $_SERVER['DOCUMENT_ROOT'];
          }
  
          if ($realPath = realpath($path)) {
              $path = $realPath;
          }
  
          return rtrim($path, '/\\');
      }
code: protected function realPath($path)
      {
          if (php_sapi_name() == 'cli' && ! $path) {
              $path = $_SERVER['DOCUMENT_ROOT'];
          }
  
          if ($realPath = realpath($path)) {
              $path = $realPath;
          }
  
          return rtrim($path, '/\\');
      }
code_tokens: protected function realPath ( $ path ) { if ( php_sapi_name ( ) == 'cli' && ! $ path ) { $ path = $ _SERVER [ 'DOCUMENT_ROOT' ] ; } if ( $ realPath = realpath ( $ path ) ) { $ path = $ realPath ; } return rtrim ( $ path , '/\\' ) ; }
docstring: Takes a path and transforms it to a real path.
  
  @param  string  $path
  @return string
docstring_tokens: Takes a path and transforms it to a real path .