| @@ 65-71 (lines=7) @@ | ||
| 62 | * @throws \InvalidArgumentException if the label is invalid |
|
| 63 | * @since 8.2.0 |
|
| 64 | */ |
|
| 65 | public function setLabel($label) { |
|
| 66 | if (!is_string($label) || $label === '' || isset($label[32])) { |
|
| 67 | throw new \InvalidArgumentException('The given label is invalid'); |
|
| 68 | } |
|
| 69 | $this->label = $label; |
|
| 70 | return $this; |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * @return string |
|
| @@ 110-116 (lines=7) @@ | ||
| 107 | * @throws \InvalidArgumentException if the app id is invalid |
|
| 108 | * @since 8.2.0 |
|
| 109 | */ |
|
| 110 | public function setApp($app) { |
|
| 111 | if (!is_string($app) || $app === '' || isset($app[32])) { |
|
| 112 | throw new \InvalidArgumentException('The given app name is invalid'); |
|
| 113 | } |
|
| 114 | $this->app = $app; |
|
| 115 | return $this; |
|
| 116 | } |
|
| 117 | ||
| 118 | /** |
|
| 119 | * @return string |
|
| @@ 132-138 (lines=7) @@ | ||
| 129 | * @throws \InvalidArgumentException if the user id is invalid |
|
| 130 | * @since 8.2.0 |
|
| 131 | */ |
|
| 132 | public function setUser($user) { |
|
| 133 | if (!is_string($user) || $user === '' || isset($user[64])) { |
|
| 134 | throw new \InvalidArgumentException('The given user id is invalid'); |
|
| 135 | } |
|
| 136 | $this->user = $user; |
|
| 137 | return $this; |
|
| 138 | } |
|
| 139 | ||
| 140 | /** |
|
| 141 | * @return string |
|
| @@ 328-334 (lines=7) @@ | ||
| 325 | * @throws \InvalidArgumentException if the link is invalid |
|
| 326 | * @since 8.2.0 |
|
| 327 | */ |
|
| 328 | public function setLink($link) { |
|
| 329 | if (!is_string($link) || $link === '' || isset($link[4000])) { |
|
| 330 | throw new \InvalidArgumentException('The given link is invalid'); |
|
| 331 | } |
|
| 332 | $this->link = $link; |
|
| 333 | return $this; |
|
| 334 | } |
|
| 335 | ||
| 336 | /** |
|
| 337 | * @return string |
|
| @@ 350-356 (lines=7) @@ | ||
| 347 | * @throws \InvalidArgumentException if the icon is invalid |
|
| 348 | * @since 9.2.0 |
|
| 349 | */ |
|
| 350 | public function setIcon($icon) { |
|
| 351 | if (!is_string($icon) || $icon === '' || isset($icon[4000])) { |
|
| 352 | throw new \InvalidArgumentException('The given icon is invalid'); |
|
| 353 | } |
|
| 354 | $this->icon = $icon; |
|
| 355 | return $this; |
|
| 356 | } |
|
| 357 | ||
| 358 | /** |
|
| 359 | * @return string |
|