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