Skip to content

Commit

Permalink
Fixes CS.
Browse files Browse the repository at this point in the history
  • Loading branch information
crynobone committed Sep 10, 2020
1 parent 1277d3b commit f7acfe3
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/Console/Commands/TelegramRegisterCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public function handle()
$output = json_decode(file_get_contents($url));

if ($output->ok == true && $output->result == true) {
$this->info($remove
$this->info(
$remove
? 'Your bot Telegram\'s webhook has been removed!'
: 'Your bot is now set up with Telegram\'s webhook!'
);
Expand Down
8 changes: 6 additions & 2 deletions src/TelegramAudioDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ public function getMessages()
*/
public function loadMessages()
{
$message = new IncomingMessage(Audio::PATTERN, $this->event->get('from')['id'], $this->event->get('chat')['id'],
$this->event);
$message = new IncomingMessage(
Audio::PATTERN,
$this->event->get('from')['id'],
$this->event->get('chat')['id'],
$this->event
);
$message->setAudio($this->getAudio());

$this->messages = [$message];
Expand Down
8 changes: 6 additions & 2 deletions src/TelegramFileDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ public function getMessages()
*/
public function loadMessages()
{
$message = new IncomingMessage(File::PATTERN, $this->event->get('from')['id'], $this->event->get('chat')['id'],
$this->event);
$message = new IncomingMessage(
File::PATTERN,
$this->event->get('from')['id'],
$this->event->get('chat')['id'],
$this->event
);
$message->setFiles($this->getFiles());

$this->messages = [$message];
Expand Down
15 changes: 11 additions & 4 deletions src/TelegramLocationDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,17 @@ public function getMessages()
*/
public function loadMessages()
{
$message = new IncomingMessage(Location::PATTERN, $this->event->get('from')['id'], $this->event->get('chat')['id'],
$this->event);
$message->setLocation(new Location($this->event->get('location')['latitude'],
$this->event->get('location')['longitude'], $this->event->get('location')));
$message = new IncomingMessage(
Location::PATTERN,
$this->event->get('from')['id'],
$this->event->get('chat')['id'],
$this->event
);
$message->setLocation(new Location(
$this->event->get('location')['latitude'],
$this->event->get('location')['longitude'],
$this->event->get('location')
));

$this->messages = [$message];
}
Expand Down
8 changes: 6 additions & 2 deletions src/TelegramPhotoDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ public function getMessages()
*/
public function loadMessages()
{
$message = new IncomingMessage(Image::PATTERN, $this->event->get('from')['id'], $this->event->get('chat')['id'],
$this->event);
$message = new IncomingMessage(
Image::PATTERN,
$this->event->get('from')['id'],
$this->event->get('chat')['id'],
$this->event
);
$message->setImages($this->getImages());

$this->messages = [$message];
Expand Down
8 changes: 6 additions & 2 deletions src/TelegramVideoDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ public function getMessages()
*/
public function loadMessages()
{
$message = new IncomingMessage(Video::PATTERN, $this->event->get('from')['id'], $this->event->get('chat')['id'],
$this->event);
$message = new IncomingMessage(
Video::PATTERN,
$this->event->get('from')['id'],
$this->event->get('chat')['id'],
$this->event
);
$message->setVideos($this->getVideos());

$this->messages = [$message];
Expand Down

0 comments on commit f7acfe3

Please sign in to comment.