original_string: private static function _autoUpdateFromFields(&$fields)
      {
          $addKeywords = [null, null];
          $removeKeywords = [null, null];
  
          if (isset($fields->add) && isset($fields->add->first_word)) {
              $addKeywords[0] = $fields->add->first_word;
          }
  
          if (isset($fields->add) && isset($fields->add->second_word)) {
              $addKeywords[1] = $fields->add->second_word;
          }
  
          if (isset($fields->remove) && isset($fields->remove->first_word)) {
              $removeKeywords[0] = $fields->remove->first_word;
          }
  
          if (isset($fields->remove) && isset($fields->remove->second_word)) {
              $removeKeywords[1] = $fields->remove->second_word;
          }
  
          return new Api\GroupAutoUpdate(
              $fields->to, $addKeywords, $removeKeywords
          );
      }
code: private static function _autoUpdateFromFields(&$fields)
      {
          $addKeywords = [null, null];
          $removeKeywords = [null, null];
  
          if (isset($fields->add) && isset($fields->add->first_word)) {
              $addKeywords[0] = $fields->add->first_word;
          }
  
          if (isset($fields->add) && isset($fields->add->second_word)) {
              $addKeywords[1] = $fields->add->second_word;
          }
  
          if (isset($fields->remove) && isset($fields->remove->first_word)) {
              $removeKeywords[0] = $fields->remove->first_word;
          }
  
          if (isset($fields->remove) && isset($fields->remove->second_word)) {
              $removeKeywords[1] = $fields->remove->second_word;
          }
  
          return new Api\GroupAutoUpdate(
              $fields->to, $addKeywords, $removeKeywords
          );
      }
code_tokens: private static function _autoUpdateFromFields ( & $ fields ) { $ addKeywords = [ null , null ] ; $ removeKeywords = [ null , null ] ; if ( isset ( $ fields -> add ) && isset ( $ fields -> add -> first_word ) ) { $ addKeywords [ 0 ] = $ fields -> add -> first_word ; } if ( isset ( $ fields -> add ) && isset ( $ fields -> add -> second_word ) ) { $ addKeywords [ 1 ] = $ fields -> add -> second_word ; } if ( isset ( $ fields -> remove ) && isset ( $ fields -> remove -> first_word ) ) { $ removeKeywords [ 0 ] = $ fields -> remove -> first_word ; } if ( isset ( $ fields -> remove ) && isset ( $ fields -> remove -> second_word ) ) { $ removeKeywords [ 1 ] = $ fields -> remove -> second_word ; } return new Api \ GroupAutoUpdate ( $ fields -> to , $ addKeywords , $ removeKeywords ) ; }
docstring: Helper that creates a group auto update object from the given
  fields.
  
  @param object $fields the fields as generated by `json_decode`
  
  @return Api\GroupAutoUpdate the created group auto update
docstring_tokens: Helper that creates a group auto update object from the given fields .