original_string: public function getInstallPath(PackageInterface $package)
      {
          if ($package->getType() === 'oxid-base') {
              return $this->_locations[$package->getType()];
          }
          $themeName = "ra";
          $extra = $package->getExtra();
          $installFolder = $this->_locations[$package->getType()] . '/' . str_replace(array($themeName . "/", '-theme'), '', $package->getPrettyName());
          if ($extra) {
              $themeName = $extra["themeName"];
              $installFolder = $this->_locations[$package->getType()] . '/' . $themeName;
          }
  
          return $installFolder;
      }
code: public function getInstallPath(PackageInterface $package)
      {
          if ($package->getType() === 'oxid-base') {
              return $this->_locations[$package->getType()];
          }
          $themeName = "ra";
          $extra = $package->getExtra();
          $installFolder = $this->_locations[$package->getType()] . '/' . str_replace(array($themeName . "/", '-theme'), '', $package->getPrettyName());
          if ($extra) {
              $themeName = $extra["themeName"];
              $installFolder = $this->_locations[$package->getType()] . '/' . $themeName;
          }
  
          return $installFolder;
      }
code_tokens: public function getInstallPath ( PackageInterface $ package ) { if ( $ package -> getType ( ) === 'oxid-base' ) { return $ this -> _locations [ $ package -> getType ( ) ] ; } $ themeName = "ra" ; $ extra = $ package -> getExtra ( ) ; $ installFolder = $ this -> _locations [ $ package -> getType ( ) ] . '/' . str_replace ( array ( $ themeName . "/" , '-theme' ) , '' , $ package -> getPrettyName ( ) ) ; if ( $ extra ) { $ themeName = $ extra [ "themeName" ] ; $ installFolder = $ this -> _locations [ $ package -> getType ( ) ] . '/' . $ themeName ; } return $ installFolder ; }
docstring: get install path by package
  
  @param PackageInterface $package package
  
  @return string
docstring_tokens: get install path by package