original_string: public function install(array $options = [], array $packageNames = [])
      {
          $options = $this->getInstallResolver()->resolve($options);
          $installer = $this->buildInstaller($options);
          $installer->setUpdateWhitelist($packageNames);
          $status = $installer->run();
  
          if ($status !== 0) {
              throw new \RuntimeException(sprintf(
                  'An error has been occurred with code: %s while resolving dependencies.',
                  $status
              ));
          }
      }
code: public function install(array $options = [], array $packageNames = [])
      {
          $options = $this->getInstallResolver()->resolve($options);
          $installer = $this->buildInstaller($options);
          $installer->setUpdateWhitelist($packageNames);
          $status = $installer->run();
  
          if ($status !== 0) {
              throw new \RuntimeException(sprintf(
                  'An error has been occurred with code: %s while resolving dependencies.',
                  $status
              ));
          }
      }
code_tokens: public function install ( array $ options = [ ] , array $ packageNames = [ ] ) { $ options = $ this -> getInstallResolver ( ) -> resolve ( $ options ) ; $ installer = $ this -> buildInstaller ( $ options ) ; $ installer -> setUpdateWhitelist ( $ packageNames ) ; $ status = $ installer -> run ( ) ; if ( $ status !== 0 ) { throw new \ RuntimeException ( sprintf ( 'An error has been occurred with code: %s while resolving dependencies.' , $ status ) ) ; } }
docstring: Installs plugins and themes.
  
  @param array    $options      Options for installing packages
  @param string[] $packageNames List of packages
  
  @throws RuntimeException If any problem occurs while resolving dependencies
docstring_tokens: Installs plugins and themes .