@@ -116,8 +116,9 @@ |
||
| 116 | 116 | */ |
| 117 | 117 | public function send($content = null) |
| 118 | 118 | { |
| 119 | - if (! is_null($content)) |
|
| 120 | - $this->setContent($content); |
|
| 119 | + if (! is_null($content)) { |
|
| 120 | + $this->setContent($content); |
|
| 121 | + } |
|
| 121 | 122 | |
| 122 | 123 | return $this->client->api->sendMessage($this); |
| 123 | 124 | } |
@@ -26,13 +26,15 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function run($name, $data) |
| 28 | 28 | { |
| 29 | - if (! array_key_exists($name, $this->events)) |
|
| 30 | - throw new \BadMethodCallException; |
|
| 29 | + if (! array_key_exists($name, $this->events)) { |
|
| 30 | + throw new \BadMethodCallException; |
|
| 31 | + } |
|
| 31 | 32 | |
| 32 | - if (is_callable($this->events[$name])) |
|
| 33 | - call_user_func($this->events[$name], $data); |
|
| 34 | - else |
|
| 35 | - call_user_func([$this, $this->events[$name]], $data); |
|
| 33 | + if (is_callable($this->events[$name])) { |
|
| 34 | + call_user_func($this->events[$name], $data); |
|
| 35 | + } else { |
|
| 36 | + call_user_func([$this, $this->events[$name]], $data); |
|
| 37 | + } |
|
| 36 | 38 | } |
| 37 | 39 | |
| 38 | 40 | /** |