code: public function extractTo($target, array $roles = array('php' => '/', 'script' => '/bin'), $vars = array())
      {
          $extractionPath = $target.'/tarball';
  
          try {
              $archive = new \PharData($this->file);
              $archive->extractTo($extractionPath, null, true);
  
              if (!is_file($this->combine($extractionPath, '/package.xml'))) {
                  throw new \RuntimeException('Invalid PEAR package. It must contain package.xml file.');
              }
  
              $fileCopyActions = $this->buildCopyActions($extractionPath, $roles, $vars);
              $this->copyFiles($fileCopyActions, $extractionPath, $target, $roles, $vars);
              $this->filesystem->removeDirectory($extractionPath);
          } catch (\Exception $exception) {
              throw new \UnexpectedValueException(sprintf('Failed to extract PEAR package %s to %s. Reason: %s', $this->file, $target, $exception->getMessage()), 0, $exception);
          }
      }
docs: Installs PEAR source files according to package.xml definitions and removes extracted files
  
  @param  string                    $target target install location. all source installation would be performed relative to target path.
  @param  array                     $roles  types of files to install. default role for PEAR source files are 'php'.
  @param  array                     $vars   used for replacement tasks
  @throws \RuntimeException
  @throws \UnexpectedValueException