| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | public function jsonSerialize() |
||
| 39 | { |
||
| 40 | $subscription = [ |
||
| 41 | '@context' => 'https://mercure.rocks/', |
||
| 42 | 'id' => $this->id, |
||
| 43 | 'type' => 'Subscription', |
||
| 44 | 'subscriber' => $this->subscriber, |
||
| 45 | 'topic' => $this->topic, |
||
| 46 | 'active' => $this->active, |
||
| 47 | ]; |
||
| 48 | |||
| 49 | if (null !== $this->payload) { |
||
| 50 | $subscription['payload'] = $this->payload; |
||
| 51 | } |
||
| 52 | |||
| 53 | return $subscription; |
||
| 54 | } |
||
| 56 |