| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function toJson($options = 0) |
||
| 43 | { |
||
| 44 | $res = $this->mapWithKeys(static function ($val) { |
||
| 45 | return [ |
||
| 46 | $val->channelJsVarKey => $val->channelContext |
||
| 47 | ]; |
||
| 48 | }); |
||
| 49 | |||
| 50 | $contextClass = new \stdClass(); |
||
| 51 | $contextClass->active = false; |
||
| 52 | $contextClass->channelStack = $res->jsonSerialize(); |
||
| 53 | |||
| 54 | return json_encode($contextClass, $options); |
||
| 55 | } |
||
| 57 |