method = $method; $this->minutes = $minutes; } /** * @param array $data * * @throws InvalidArgumentException * * @return GoogleCalendarEventReminderValue */ public static function fromArray(array $data): GoogleCalendarEventReminderValue { if (!isset($data['method'], $data['minutes'])) { throw new InvalidArgumentException('method and minutes required for notification values.'); } return new self($data['method'], $data['minutes']); } /** * @return array */ public function toArray(): array { $data = []; $data['method'] = $this->getMethod(); $data['minutes'] = $this->getMinutes(); return $data; } /** * @return string */ public function getMethod(): string { return $this->method; } /** * @return int */ public function getMinutes(): int { return $this->minutes; } }