original_string: private function absolutePath($path)
      {
          if (substr($path, 0, 2) === './') {
              $path = dirname(__DIR__) . DS . substr($path, 2);
          } elseif (substr($path, 0, 1) !== '/' || substr($path, 0, 3) === '../') {
              $path = dirname(__DIR__) . DS . $path;
          }
          return rtrim($path, DS);
      }
code: private function absolutePath($path)
      {
          if (substr($path, 0, 2) === './') {
              $path = dirname(__DIR__) . DS . substr($path, 2);
          } elseif (substr($path, 0, 1) !== '/' || substr($path, 0, 3) === '../') {
              $path = dirname(__DIR__) . DS . $path;
          }
          return rtrim($path, DS);
      }
code_tokens: private function absolutePath ( $ path ) { if ( substr ( $ path , 0 , 2 ) === './' ) { $ path = dirname ( __DIR__ ) . DS . substr ( $ path , 2 ) ; } elseif ( substr ( $ path , 0 , 1 ) !== '/' || substr ( $ path , 0 , 3 ) === '../' ) { $ path = dirname ( __DIR__ ) . DS . $ path ; } return rtrim ( $ path , DS ) ; }
docstring: Return the absolute path to a file
  
  @param string $path Path to convert
  
  @return string Absolute path to the file
docstring_tokens: Return the absolute path to a file