original_string: public static function group(Api\GroupCreate $group)
      {
          $fields = [];
  
          if ($group->getName() != null) {
              $fields['name'] = $group->getName();
          }
  
          if (!empty($group->getMembers())) {
              $fields['members'] = $group->getMembers();
          }
  
          if (!empty($group->getChildGroups())) {
              $fields['child_groups'] = $group->getChildGroups();
          }
  
          if ($group->getAutoUpdate() != null) {
              $fields['auto_update'] = Serialize::_groupAutoUpdateHelper(
                  $group->getAutoUpdate()
              );
          }
  
          if (!empty($group->getTags())) {
              $fields['tags'] = $group->getTags();
          }
  
          return Serialize::_toJson($fields);
      }
code: public static function group(Api\GroupCreate $group)
      {
          $fields = [];
  
          if ($group->getName() != null) {
              $fields['name'] = $group->getName();
          }
  
          if (!empty($group->getMembers())) {
              $fields['members'] = $group->getMembers();
          }
  
          if (!empty($group->getChildGroups())) {
              $fields['child_groups'] = $group->getChildGroups();
          }
  
          if ($group->getAutoUpdate() != null) {
              $fields['auto_update'] = Serialize::_groupAutoUpdateHelper(
                  $group->getAutoUpdate()
              );
          }
  
          if (!empty($group->getTags())) {
              $fields['tags'] = $group->getTags();
          }
  
          return Serialize::_toJson($fields);
      }
code_tokens: public static function group ( Api \ GroupCreate $ group ) { $ fields = [ ] ; if ( $ group -> getName ( ) != null ) { $ fields [ 'name' ] = $ group -> getName ( ) ; } if ( ! empty ( $ group -> getMembers ( ) ) ) { $ fields [ 'members' ] = $ group -> getMembers ( ) ; } if ( ! empty ( $ group -> getChildGroups ( ) ) ) { $ fields [ 'child_groups' ] = $ group -> getChildGroups ( ) ; } if ( $ group -> getAutoUpdate ( ) != null ) { $ fields [ 'auto_update' ] = Serialize :: _groupAutoUpdateHelper ( $ group -> getAutoUpdate ( ) ) ; } if ( ! empty ( $ group -> getTags ( ) ) ) { $ fields [ 'tags' ] = $ group -> getTags ( ) ; } return Serialize :: _toJson ( $ fields ) ; }
docstring: Serializes the given group create object to JSON.
  
  @param Api\GroupCreate $group the group to serialize
  
  @return string a JSON string
docstring_tokens: Serializes the given group create object to JSON .