| Conditions | 5 |
| Paths | 16 |
| Total Lines | 25 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 14 |
| CRAP Score | 5.1374 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 2 | public function read() |
|
| 28 | { |
||
| 29 | return [ |
||
| 30 | 2 | 'id' => $this->notification->notificationId()->id(), |
|
| 31 | 2 | 'destination' => json_decode($this->notification->destination()->typedJsonRepresentation(), true), |
|
| 32 | 2 | 'subject' => $this->notification->subject()->subject(), |
|
| 33 | 2 | 'body' => $this->notification->body()->body(), |
|
| 34 | 2 | 'deduplication_key' => $this->notification->deduplicationKey() |
|
| 35 | 1 | ? $this->notification->deduplicationKey()->key() |
|
| 36 | : null, |
||
| 37 | 2 | 'metadata' => $this->notification->metadata(), |
|
| 38 | 2 | 'created_at' => $this->notification->createdAt()->format(DateTime::W3C), |
|
| 39 | 2 | 'failed_at' => $this->notification->failedAt() |
|
| 40 | ? $this->notification->failedAt()->format(DateTime::W3C) |
||
| 41 | : null, |
||
| 42 | 2 | 'failed_for' => $this->notification->failedFor(), |
|
| 43 | 2 | 'sent_at' => $this->notification->sentAt() |
|
| 44 | ? $this->notification->sentAt()->format(DateTime::W3C) |
||
| 45 | : null, |
||
| 46 | 2 | 'locked_at' => $this->notification->lockedAt() |
|
| 47 | ? $this->notification->lockedAt()->format(DateTime::W3C) |
||
| 48 | : null, |
||
| 49 | 2 | 'is_fresh' => $this->notification->isFresh(), |
|
| 50 | ]; |
||
| 51 | } |
||
| 52 | } |