code: private function formatResponse(SimpleXMLElement $response)
      {
          $eventsException = ['FileName', 'StatusType'];
          $output = new ArrayObject();
  
          // Empty response?
          if (!isset($response->QuantumViewEvents->SubscriptionEvents->SubscriptionFile)) {
              return $output;
          }
  
          // Loop subscription files
          foreach ($response->QuantumViewEvents->SubscriptionEvents->SubscriptionFile as $subcriptionFile) {
              foreach ($subcriptionFile as $eventName => $event) {
                  if (!in_array($eventName, $eventsException)) {
                      $event = $this->convertXmlObject($event);
                      $event = (object)array_merge(
                          ['Type' => $eventName],
                          (array)$event
                      );
                      $output->append($event);
                  }
              }
          }
  
          return $output;
      }
docs: Format the response.
  
  @param SimpleXMLElement $response
  
  @return ArrayObject