original_string: protected function applyPluginUpdate($code, $version, $details)
      {
          if (is_array($details)) {
              $comment = array_shift($details);
              $scripts = $details;
          }
          else {
              $comment = $details;
              $scripts = [];
          }
  
          /*
           * Apply scripts, if any
           */
          foreach ($scripts as $script) {
              if ($this->hasDatabaseHistory($code, $version, $script)) {
                  continue;
              }
  
              $this->applyDatabaseScript($code, $version, $script);
          }
  
          /*
           * Register the comment and update the version
           */
          if (!$this->hasDatabaseHistory($code, $version)) {
              $this->applyDatabaseComment($code, $version, $comment);
          }
  
          $this->setDatabaseVersion($code, $version);
  
          $this->note(sprintf('- <info>v%s: </info> %s', $version, $comment));
      }
code: protected function applyPluginUpdate($code, $version, $details)
      {
          if (is_array($details)) {
              $comment = array_shift($details);
              $scripts = $details;
          }
          else {
              $comment = $details;
              $scripts = [];
          }
  
          /*
           * Apply scripts, if any
           */
          foreach ($scripts as $script) {
              if ($this->hasDatabaseHistory($code, $version, $script)) {
                  continue;
              }
  
              $this->applyDatabaseScript($code, $version, $script);
          }
  
          /*
           * Register the comment and update the version
           */
          if (!$this->hasDatabaseHistory($code, $version)) {
              $this->applyDatabaseComment($code, $version, $comment);
          }
  
          $this->setDatabaseVersion($code, $version);
  
          $this->note(sprintf('- <info>v%s: </info> %s', $version, $comment));
      }
code_tokens: protected function applyPluginUpdate ( $ code , $ version , $ details ) { if ( is_array ( $ details ) ) { $ comment = array_shift ( $ details ) ; $ scripts = $ details ; } else { $ comment = $ details ; $ scripts = [ ] ; } /*
           * Apply scripts, if any
           */ foreach ( $ scripts as $ script ) { if ( $ this -> hasDatabaseHistory ( $ code , $ version , $ script ) ) { continue ; } $ this -> applyDatabaseScript ( $ code , $ version , $ script ) ; } /*
           * Register the comment and update the version
           */ if ( ! $ this -> hasDatabaseHistory ( $ code , $ version ) ) { $ this -> applyDatabaseComment ( $ code , $ version , $ comment ) ; } $ this -> setDatabaseVersion ( $ code , $ version ) ; $ this -> note ( sprintf ( '- <info>v%s: </info> %s' , $ version , $ comment ) ) ; }
docstring: Applies a single version update to a plugin.
docstring_tokens: Applies a single version update to a plugin .