original_string: public function get_update_info($component, array $options = array()) {
  
          if (!isset($options['minmaturity'])) {
              $options['minmaturity'] = 0;
          }
  
          if (!isset($options['notifybuilds'])) {
              $options['notifybuilds'] = false;
          }
  
          if ($component === 'core') {
              $this->load_current_environment();
          }
  
          $this->restore_response();
  
          if (empty($this->recentresponse['updates'][$component])) {
              return null;
          }
  
          $updates = array();
          foreach ($this->recentresponse['updates'][$component] as $info) {
              $update = new info($component, $info);
              if (isset($update->maturity) and ($update->maturity < $options['minmaturity'])) {
                  continue;
              }
              if ($component === 'core') {
                  if ($update->version <= $this->currentversion) {
                      continue;
                  }
                  if (empty($options['notifybuilds']) and $this->is_same_release($update->release)) {
                      continue;
                  }
              }
              $updates[] = $update;
          }
  
          if (empty($updates)) {
              return null;
          }
  
          return $updates;
      }
code: public function get_update_info($component, array $options = array()) {
  
          if (!isset($options['minmaturity'])) {
              $options['minmaturity'] = 0;
          }
  
          if (!isset($options['notifybuilds'])) {
              $options['notifybuilds'] = false;
          }
  
          if ($component === 'core') {
              $this->load_current_environment();
          }
  
          $this->restore_response();
  
          if (empty($this->recentresponse['updates'][$component])) {
              return null;
          }
  
          $updates = array();
          foreach ($this->recentresponse['updates'][$component] as $info) {
              $update = new info($component, $info);
              if (isset($update->maturity) and ($update->maturity < $options['minmaturity'])) {
                  continue;
              }
              if ($component === 'core') {
                  if ($update->version <= $this->currentversion) {
                      continue;
                  }
                  if (empty($options['notifybuilds']) and $this->is_same_release($update->release)) {
                      continue;
                  }
              }
              $updates[] = $update;
          }
  
          if (empty($updates)) {
              return null;
          }
  
          return $updates;
      }
code_tokens: public function get_update_info ( $ component , array $ options = array ( ) ) { if ( ! isset ( $ options [ 'minmaturity' ] ) ) { $ options [ 'minmaturity' ] = 0 ; } if ( ! isset ( $ options [ 'notifybuilds' ] ) ) { $ options [ 'notifybuilds' ] = false ; } if ( $ component === 'core' ) { $ this -> load_current_environment ( ) ; } $ this -> restore_response ( ) ; if ( empty ( $ this -> recentresponse [ 'updates' ] [ $ component ] ) ) { return null ; } $ updates = array ( ) ; foreach ( $ this -> recentresponse [ 'updates' ] [ $ component ] as $ info ) { $ update = new info ( $ component , $ info ) ; if ( isset ( $ update -> maturity ) and ( $ update -> maturity < $ options [ 'minmaturity' ] ) ) { continue ; } if ( $ component === 'core' ) { if ( $ update -> version <= $ this -> currentversion ) { continue ; } if ( empty ( $ options [ 'notifybuilds' ] ) and $ this -> is_same_release ( $ update -> release ) ) { continue ; } } $ updates [ ] = $ update ; } if ( empty ( $ updates ) ) { return null ; } return $ updates ; }
docstring: Returns the available update information for the given component
  
  This method returns null if the most recent response does not contain any information
  about it. The returned structure is an array of available updates for the given
  component. Each update info is an object with at least one property called
  'version'. Other possible properties are 'release', 'maturity', 'url' and 'downloadurl'.
  
  For the 'core' component, the method returns real updates only (those with higher version).
  For all other components, the list of all known remote updates is returned and the caller
  (usually the {@link core_plugin_manager}) is supposed to make the actual comparison of versions.
  
  @param string $component frankenstyle
  @param array $options with supported keys 'minmaturity' and/or 'notifybuilds'
  @return null|array null or array of \core\update\info objects
docstring_tokens: Returns the available update information for the given component