Skip to content

Commit e45bf1f

Browse files
authored
Merge pull request #3 from laravel-notification-channels/analysis-8A7ABZ
Applied fixes from StyleCI
2 parents 2f05193 + 02aeb4c commit e45bf1f

File tree

8 files changed

+11
-14
lines changed

8 files changed

+11
-14
lines changed

src/Attachment/Button.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,21 +154,21 @@ public function toArray()
154154
$payload = [];
155155
$payload['type'] = $this->type;
156156

157-
if (!isset($this->title)) {
157+
if (! isset($this->title)) {
158158
throw CouldNotCreateButton::titleNotProvided();
159159
}
160160

161161
$this->validateTitle();
162162
$payload['title'] = $this->title;
163163

164164
if ($this->isType(self::TYPE_WEB_URL)) {
165-
if (!isset($this->data)) {
165+
if (! isset($this->data)) {
166166
throw CouldNotCreateButton::urlNotProvided();
167167
}
168168

169169
$payload['url'] = $this->data;
170170
} else {
171-
if (!isset($this->data)) {
171+
if (! isset($this->data)) {
172172
throw CouldNotCreateButton::dataNotProvided($this->type);
173173
}
174174

@@ -225,8 +225,8 @@ protected function validatePayload()
225225
*/
226226
protected function validatePhoneNumber()
227227
{
228-
if ($this->isType(self::TYPE_PHONE_NUMBER) && !starts_with($this->data, '+')) {
228+
if ($this->isType(self::TYPE_PHONE_NUMBER) && ! starts_with($this->data, '+')) {
229229
throw CouldNotCreateButton::invalidPhoneNumberProvided($this->data);
230230
}
231231
}
232-
}
232+
}

src/Events/SendingMessage.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
class SendingMessage
88
{
9-
109
protected $notifiable;
1110

1211
/** @var \Illuminate\Notifications\Notification */

src/Exceptions/CouldNotCreateButton.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static function invalidPhoneNumberProvided($phoneNumber)
7373
return new static(
7474
"Provided phone number `{$phoneNumber}` format is invalid.".
7575
"Format must be '+' prefix followed by the country code, area code and local number.".
76-
"Please check the button template docs for more information."
76+
'Please check the button template docs for more information.'
7777
);
7878
}
7979
}

src/Facebook.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ protected function api($endpoint, $options, $method = 'GET')
9595
throw CouldNotSendNotification::couldNotCommunicateWithFacebook();
9696
}
9797
}
98-
}
98+
}

src/FacebookChannel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function __construct(Facebook $fb)
2828
*/
2929
public function send($notifiable, Notification $notification)
3030
{
31-
if (!$this->shouldSendMessage($notifiable, $notification)) {
31+
if (! $this->shouldSendMessage($notifiable, $notification)) {
3232
return;
3333
}
3434

@@ -39,7 +39,7 @@ public function send($notifiable, Notification $notification)
3939
}
4040

4141
if ($message->toNotGiven()) {
42-
if (!$to = $notifiable->routeNotificationFor('facebook')) {
42+
if (! $to = $notifiable->routeNotificationFor('facebook')) {
4343
return;
4444
}
4545

src/FacebookMessage.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function buttons(array $buttons = [])
110110
*/
111111
public function toNotGiven()
112112
{
113-
return !isset($this->recipient);
113+
return ! isset($this->recipient);
114114
}
115115

116116
/**
@@ -146,4 +146,3 @@ public function toArray()
146146
return $payload;
147147
}
148148
}
149-

src/FacebookServiceProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@ public function boot()
1818

1919
return new Facebook($pageToken);
2020
});
21-
2221
}
2322
}

src/NotificationType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ interface NotificationType
1212

1313
/** Not emit */
1414
const NO_PUSH = 'NO_PUSH';
15-
}
15+
}

0 commit comments

Comments
 (0)