| @@ 76-90 (lines=15) @@ | ||
| 73 | /** |
|
| 74 | * @inheritdoc |
|
| 75 | */ |
|
| 76 | public function jsonSerialize() |
|
| 77 | { |
|
| 78 | $data = [ |
|
| 79 | 'type' => $this->type, |
|
| 80 | 'title' => $this->title, |
|
| 81 | ]; |
|
| 82 | ||
| 83 | if ($this->type === self::TYPE_WEB_URL) { |
|
| 84 | $data['url'] = $this->data; |
|
| 85 | } else { |
|
| 86 | $data['payload'] = $this->data; |
|
| 87 | } |
|
| 88 | ||
| 89 | return $data; |
|
| 90 | } |
|
| 91 | ||
| 92 | /** |
|
| 93 | * @param string $title |
|
| @@ 73-87 (lines=15) @@ | ||
| 70 | /** |
|
| 71 | * @inheritdoc |
|
| 72 | */ |
|
| 73 | public function jsonSerialize() |
|
| 74 | { |
|
| 75 | $data = [ |
|
| 76 | 'type' => $this->type, |
|
| 77 | 'title' => $this->title, |
|
| 78 | ]; |
|
| 79 | ||
| 80 | if ($this->type === self::TYPE_WEB_URL) { |
|
| 81 | $data['url'] = $this->data; |
|
| 82 | } else { |
|
| 83 | $data['payload'] = $this->data; |
|
| 84 | } |
|
| 85 | ||
| 86 | return $data; |
|
| 87 | } |
|
| 88 | ||
| 89 | /** |
|
| 90 | * @param string $title |
|