statuses = $statuses; $this->parseError = $parseError; } /** * @return string[] */ public function getStatuses() { return $this->statuses; } /** * @param $eventId * @return string|null */ public function getStatus($eventId) { return isset($this->statuses[$eventId]) ? $this->statuses[$eventId] : null; } /** * @param string $eventId * @return bool */ public function isDelivered($eventId) { return in_array($this->getStatus($eventId), [self::STATUS_ACCEPTED, self::STATUS_IGNORED], true); } /** * @return string|null */ public function getParseError() { return $this->parseError; } }