@@ -56,7 +56,7 @@ |
||
56 | 56 | ->createRequest() |
57 | 57 | ->setMethod('post') |
58 | 58 | ->setUrl($this->getUri()) |
59 | - ->addHeaders(['Authorization' => 'Basic ' . base64_encode("{$this->accountSid}:{$this->authToken}")]) |
|
59 | + ->addHeaders(['Authorization' => 'Basic '.base64_encode("{$this->accountSid}:{$this->authToken}")]) |
|
60 | 60 | ->setData($data) |
61 | 61 | ->send(); |
62 | 62 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $recipients = [$recipients]; |
79 | 79 | } |
80 | 80 | |
81 | - if (!is_array($notifications)){ |
|
81 | + if (!is_array($notifications)) { |
|
82 | 82 | /** |
83 | 83 | * @var $notifications NotificationInterface[] |
84 | 84 | */ |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | foreach ($channels as $channel) { |
97 | 97 | $channelInstance = $this->getChannelInstance($channel); |
98 | 98 | try { |
99 | - \Yii::info("Sending notification " . get_class($notification) . " to " . get_class($recipient) . " via {$channel}", __METHOD__); |
|
99 | + \Yii::info("Sending notification ".get_class($notification)." to ".get_class($recipient)." via {$channel}", __METHOD__); |
|
100 | 100 | $response = $channelInstance->send($recipient, $notification); |
101 | 101 | } catch (\Exception $e) { |
102 | 102 | $response = $e; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | parent::init(); |
56 | 56 | |
57 | - if(!isset($this->botToken)){ |
|
57 | + if (!isset($this->botToken)) { |
|
58 | 58 | throw new InvalidConfigException('Bot token is undefined'); |
59 | 59 | } |
60 | 60 | |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | $text = "*{$message->subject}*\n{$message->body}"; |
81 | 81 | } |
82 | 82 | $chatId = $recipient->routeNotificationFor('telegram'); |
83 | - if(!$chatId){ |
|
84 | - throw new InvalidArgumentException( 'No chat ID provided'); |
|
83 | + if (!$chatId) { |
|
84 | + throw new InvalidArgumentException('No chat ID provided'); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | $data = [ |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $data['reply_markup'] = Json::encode($message->replyMarkup); |
100 | 100 | } |
101 | 101 | |
102 | - if(isset($this->parseMode)){ |
|
102 | + if (isset($this->parseMode)) { |
|
103 | 103 | $data['parse_mode'] = $this->parseMode; |
104 | 104 | } |
105 | 105 |