/**
  * @return array
  */
 public function toArray() : array
 {
     $errorArray = [];
     $errorArray['code'] = $this->errorCode->getValue();
     $errorArray['errorText'] = $this->errorCode->getText();
     $errorArray['origin'] = $this->zone->getOrigin();
     if (!NULL === $this->node) {
         $errorArray['node'] = $this->node->getName();
     }
     if (!NULL === $this->record) {
         $errorArray['recordData'] = $this->record->toArray();
         $errorArray['checkedAttribute'] = $this->checkedAttribute;
     }
     return $errorArray;
 }