original_string: public function get($type, $file = null)
      {
          if (!isset($this->paths[$type])) {
              $method = 'get'.Utils::camelize($type).'Dir';
  
              if (!method_exists($this, $method)) {
                  return null;
              }
  
              $this->set($type, $this->$method());
          }
  
          $path = $this->paths[$type];
          if ($file) {
              if ($path instanceof pathmanager\FallbackInterface) {
                  $path = $path->resolve($file);
              } else {
                  $path .= '/' . ltrim($file, '/');
              }
          }
  
          return $path;
      }
code: public function get($type, $file = null)
      {
          if (!isset($this->paths[$type])) {
              $method = 'get'.Utils::camelize($type).'Dir';
  
              if (!method_exists($this, $method)) {
                  return null;
              }
  
              $this->set($type, $this->$method());
          }
  
          $path = $this->paths[$type];
          if ($file) {
              if ($path instanceof pathmanager\FallbackInterface) {
                  $path = $path->resolve($file);
              } else {
                  $path .= '/' . ltrim($file, '/');
              }
          }
  
          return $path;
      }
code_tokens: public function get ( $ type , $ file = null ) { if ( ! isset ( $ this -> paths [ $ type ] ) ) { $ method = 'get' . Utils :: camelize ( $ type ) . 'Dir' ; if ( ! method_exists ( $ this , $ method ) ) { return null ; } $ this -> set ( $ type , $ this -> $ method ( ) ) ; } $ path = $ this -> paths [ $ type ] ; if ( $ file ) { if ( $ path instanceof pathmanager \ FallbackInterface ) { $ path = $ path -> resolve ( $ file ) ; } else { $ path .= '/' . ltrim ( $ file , '/' ) ; } } return $ path ; }
docstring: Returns a path
  
  @param string $type
  @param string $file
docstring_tokens: Returns a path