@@ -116,7 +116,7 @@ |
||
| 116 | 116 | */ |
| 117 | 117 | public function send($content = null) |
| 118 | 118 | { |
| 119 | - if (! is_null($content)) |
|
| 119 | + if (!is_null($content)) |
|
| 120 | 120 | $this->setContent($content); |
| 121 | 121 | |
| 122 | 122 | return $this->client->api->sendMessage($this); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | { |
| 29 | 29 | if (is_null($events_handler)) { |
| 30 | 30 | $events_handler = new EventsHandler(); |
| 31 | - } elseif (! $events_handler instanceof EventsHandler) { |
|
| 31 | + } elseif (!$events_handler instanceof EventsHandler) { |
|
| 32 | 32 | throw new InvalidArgumentException('Second parameter must be instance of EventsHandler'); |
| 33 | 33 | } |
| 34 | 34 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function run($name, $data) |
| 28 | 28 | { |
| 29 | - if (! array_key_exists($name, $this->events)) |
|
| 29 | + if (!array_key_exists($name, $this->events)) |
|
| 30 | 30 | throw new \BadMethodCallException; |
| 31 | 31 | |
| 32 | 32 | if (is_callable($this->events[$name])) |
@@ -132,7 +132,7 @@ |
||
| 132 | 132 | */ |
| 133 | 133 | public function uploadFile($filename) |
| 134 | 134 | { |
| 135 | - if (! file_exists($filename)) { |
|
| 135 | + if (!file_exists($filename)) { |
|
| 136 | 136 | throw new \BadMethodCallException('File not exists'); |
| 137 | 137 | } |
| 138 | 138 | |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | $media->setType(Message::CONTENT_TYPE_MEDIA_IMAGE); |
| 20 | 20 | $media->setContent($token); |
| 21 | 21 | |
| 22 | - $client->command('message/new', function ($message) use ($client, $media) { |
|
| 22 | + $client->command('message/new', function($message) use ($client, $media) { |
|
| 23 | 23 | |
| 24 | 24 | $client->to($message['chat_id'])->setType($media->getType())->send($media->getContent()); |
| 25 | 25 | /* or */ |
@@ -8,13 +8,13 @@ |
||
| 8 | 8 | try { |
| 9 | 9 | $client = new Client($API_KEY); |
| 10 | 10 | |
| 11 | - $client->command('user/follow', function ($user) use ($client) { |
|
| 11 | + $client->command('user/follow', function($user) use ($client) { |
|
| 12 | 12 | $chat = $client->api->createChat($user['id']); |
| 13 | 13 | |
| 14 | 14 | $client->to($chat->data->id)->send('Welcome'); |
| 15 | 15 | }); |
| 16 | 16 | |
| 17 | - $client->command('message/new', function ($message) use ($client) { |
|
| 17 | + $client->command('message/new', function($message) use ($client) { |
|
| 18 | 18 | $client->to($message['chat_id'])->setType($message['type'])->send($message['content']); |
| 19 | 19 | }); |
| 20 | 20 | |