@@ 111-118 (lines=8) @@ | ||
108 | $this->to = $query['to'] ?? null; |
|
109 | $this->returnData = $query['returndata'] ?? null; |
|
110 | ||
111 | if (isset($query['receivetime'])) { |
|
112 | $this->receiveTime = \DateTimeImmutable::createFromFormat('U', $query['receivetime']); |
|
113 | if ($this->receiveTime === false) { |
|
114 | throw new InvalidWebhookException( |
|
115 | 'The format of `receivetime` is wrong. Value given: '.$query['receivetime'] |
|
116 | ); |
|
117 | } |
|
118 | } |
|
119 | ||
120 | if (isset($query['statuscode'])) { |
|
121 | $this->statusCode = (int)$query['statuscode']; |
|
@@ 124-129 (lines=6) @@ | ||
121 | $this->statusCode = (int)$query['statuscode']; |
|
122 | } |
|
123 | ||
124 | if (isset($query['logdate'])) { |
|
125 | $this->logDate = \DateTimeImmutable::createFromFormat('Y_m_d', $query['logdate']); |
|
126 | if ($this->logDate === false) { |
|
127 | throw new InvalidWebhookException('The format of `logdate` is wrong. Value given: '.$query['logdate']); |
|
128 | } |
|
129 | } |
|
130 | ||
131 | if (isset($query['mcc'])) { |
|
132 | $this->mcc = (int)$query['mcc']; |