original_string: public function convertQueryResultList(array $data = null)
      {
          if (empty($data)) {
              return null;
          }
  
          $objectList = new ObjectList();
          $objects = [];
  
          foreach ((array) ($data[JSONConstants::JSON_QUERYRESULTLIST_RESULTS] ?? []) as $objectData) {
              $object = $this->convertObject($objectData);
  
              if ($object !== null) {
                  $objects[] = $object;
              }
          }
  
          $objectList->setObjects($objects);
          $objectList->setHasMoreItems((boolean) ($data[JSONConstants::JSON_QUERYRESULTLIST_HAS_MORE_ITEMS] ?? false));
  
          if (isset($data[JSONConstants::JSON_QUERYRESULTLIST_NUM_ITEMS])) {
              $objectList->setNumItems((integer) $data[JSONConstants::JSON_QUERYRESULTLIST_NUM_ITEMS]);
          }
  
          $objectList->setExtensions($this->convertExtension($data, JSONConstants::getQueryResultListKeys()));
  
          return $objectList;
      }
code: public function convertQueryResultList(array $data = null)
      {
          if (empty($data)) {
              return null;
          }
  
          $objectList = new ObjectList();
          $objects = [];
  
          foreach ((array) ($data[JSONConstants::JSON_QUERYRESULTLIST_RESULTS] ?? []) as $objectData) {
              $object = $this->convertObject($objectData);
  
              if ($object !== null) {
                  $objects[] = $object;
              }
          }
  
          $objectList->setObjects($objects);
          $objectList->setHasMoreItems((boolean) ($data[JSONConstants::JSON_QUERYRESULTLIST_HAS_MORE_ITEMS] ?? false));
  
          if (isset($data[JSONConstants::JSON_QUERYRESULTLIST_NUM_ITEMS])) {
              $objectList->setNumItems((integer) $data[JSONConstants::JSON_QUERYRESULTLIST_NUM_ITEMS]);
          }
  
          $objectList->setExtensions($this->convertExtension($data, JSONConstants::getQueryResultListKeys()));
  
          return $objectList;
      }
code_tokens: public function convertQueryResultList ( array $ data = null ) { if ( empty ( $ data ) ) { return null ; } $ objectList = new ObjectList ( ) ; $ objects = [ ] ; foreach ( ( array ) ( $ data [ JSONConstants :: JSON_QUERYRESULTLIST_RESULTS ] ?? [ ] ) as $ objectData ) { $ object = $ this -> convertObject ( $ objectData ) ; if ( $ object !== null ) { $ objects [ ] = $ object ; } } $ objectList -> setObjects ( $ objects ) ; $ objectList -> setHasMoreItems ( ( boolean ) ( $ data [ JSONConstants :: JSON_QUERYRESULTLIST_HAS_MORE_ITEMS ] ?? false ) ) ; if ( isset ( $ data [ JSONConstants :: JSON_QUERYRESULTLIST_NUM_ITEMS ] ) ) { $ objectList -> setNumItems ( ( integer ) $ data [ JSONConstants :: JSON_QUERYRESULTLIST_NUM_ITEMS ] ) ; } $ objectList -> setExtensions ( $ this -> convertExtension ( $ data , JSONConstants :: getQueryResultListKeys ( ) ) ) ; return $ objectList ; }
docstring: Convert given input data array from query result to a ObjectList object
  
  @param array|null $data
  @return null|ObjectList
docstring_tokens: Convert given input data array from query result to a ObjectList object