| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 73 | public function jsonSerialize(): array |
||
| 74 | { |
||
| 75 | $output = [ |
||
| 76 | 'type' => $this->getType(), |
||
| 77 | 'field' => $this->getField(), |
||
| 78 | 'left' => $this->getLeft(), |
||
| 79 | 'right' => $this->getRight(), |
||
| 80 | 'is_applied' => $this->isApplied(), |
||
| 81 | 'is_negated' => $this->isNegated(), |
||
| 82 | ]; |
||
| 83 | |||
| 84 | if ($this->isApplied()) { |
||
| 85 | $output['unset_link'] = stringify_uri($this->getToggleUri()); |
||
| 86 | } else { |
||
| 87 | $output['link'] = stringify_uri($this->getToggleUri()); |
||
| 88 | } |
||
| 89 | |||
| 90 | return $output; |
||
| 91 | } |
||
| 92 | } |
||
| 93 |