| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 52 | public function jsonSerialize() |
||
| 53 | { |
||
| 54 | $subscription = [ |
||
| 55 | '@context' => 'https://mercure.rocks/', |
||
| 56 | 'id' => $this->id, |
||
| 57 | 'type' => 'Subscription', |
||
| 58 | 'subscriber' => $this->subscriber, |
||
| 59 | 'topic' => $this->topic, |
||
| 60 | 'active' => $this->active, |
||
| 61 | ]; |
||
| 62 | |||
| 63 | if (null !== $this->payload) { |
||
| 64 | $subscription['payload'] = $this->payload; |
||
| 65 | } |
||
| 66 | |||
| 67 | return $subscription; |
||
| 68 | } |
||
| 70 |