| Conditions | 7 | 
| Paths | 64 | 
| Total Lines | 26 | 
| Code Lines | 16 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 160 | public function formatData() | ||
| 161 |     { | ||
| 162 | $payload = []; | ||
| 163 | |||
| 164 |         if (!empty($this->to)) { | ||
| 165 | $payload['to'] = $this->to; | ||
| 166 | } | ||
| 167 |         if (!empty($this->from)) { | ||
| 168 | $payload['from'] = $this->from; | ||
| 169 | } | ||
| 170 |         if (!empty($this->link)) { | ||
| 171 | $payload['link'] = $this->link; | ||
| 172 | } | ||
| 173 |         if (!empty($this->text)) { | ||
| 174 | $payload['text'] = $this->text; | ||
| 175 | } | ||
| 176 |         if (!empty($this->sendAt)) { | ||
| 177 | $payload['send_at'] = $this->sendAt; | ||
| 178 |         } else { | ||
| 179 |             $payload['send_at'] = Carbon::now()->format('Y-m-d H:i:s'); | ||
| 180 | } | ||
| 181 |         if (!empty($this->custom)) { | ||
| 182 | $payload['custom'] = $this->custom; | ||
| 183 | } | ||
| 184 | |||
| 185 | return $payload; | ||
| 186 | } | ||
| 187 | } |