Skip to content

Commit d756a16

Browse files
committed
Further style updates
1 parent 2982dc2 commit d756a16

File tree

7 files changed

+17
-18
lines changed

7 files changed

+17
-18
lines changed

src/TwilioChannel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected function getTo($notifiable)
9191
*/
9292
protected function canReceiveAlphanumericSender($notifiable)
9393
{
94-
return (method_exists($notifiable, 'canReceiveAlphanumericSender') &&
95-
$notifiable->canReceiveAlphanumericSender());
94+
return method_exists($notifiable, 'canReceiveAlphanumericSender') &&
95+
$notifiable->canReceiveAlphanumericSender();
9696
}
9797
}

src/TwilioConfig.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace NotificationChannels\Twilio;
34

45
class TwilioConfig
@@ -71,4 +72,4 @@ public function getServiceSid()
7172
return $this->config['sms_service_sid'];
7273
}
7374
}
74-
}
75+
}

src/TwilioMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function from($from)
6565
}
6666

6767
/**
68-
* Get the from address
68+
* Get the from address.
6969
*
7070
* @return string
7171
*/

src/TwilioSmsMessage.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ public function getFrom()
2323
if ($this->alphaNumSender && strlen($this->alphaNumSender) > 0) {
2424
return $this->alphaNumSender;
2525
}
26-
27-
return null;
2826
}
2927

3028
/**

tests/IntegrationTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ public function it_can_send_a_sms_message()
4545
$this->notification->shouldReceive('toTwilio')->andReturn($message);
4646

4747
$config = new TwilioConfig([
48-
'from' => '+31612345678'
48+
'from' => '+31612345678',
4949
]);
5050
$twilio = new Twilio($this->twilioService, $config);
5151
$channel = new TwilioChannel($twilio, $this->events);
5252

5353
$this->smsMessageWillBeSentToTwilioWith('+22222222222', [
5454
'from' => '+31612345678',
55-
'body' => 'Message text'
55+
'body' => 'Message text',
5656
]);
5757

5858
$channel->send(new NotifiableWithAttribute(), $this->notification);
@@ -66,15 +66,15 @@ public function it_can_send_a_sms_message_using_service()
6666

6767
$config = new TwilioConfig([
6868
'from' => '+31612345678',
69-
'sms_service_sid' => '0123456789'
69+
'sms_service_sid' => '0123456789',
7070
]);
7171
$twilio = new Twilio($this->twilioService, $config);
7272
$channel = new TwilioChannel($twilio, $this->events);
7373

7474
$this->smsMessageWillBeSentToTwilioWith('+22222222222', [
7575
'from' => '+31612345678',
7676
'body' => 'Message text',
77-
'messagingServiceSid' => '0123456789'
77+
'messagingServiceSid' => '0123456789',
7878
]);
7979

8080
$channel->send(new NotifiableWithAttribute(), $this->notification);
@@ -88,14 +88,14 @@ public function it_can_send_a_sms_message_using_alphanumeric_sender()
8888

8989
$config = new TwilioConfig([
9090
'from' => '+31612345678',
91-
'alphanumeric_sender' => 'TwilioTest'
91+
'alphanumeric_sender' => 'TwilioTest',
9292
]);
9393
$twilio = new Twilio($this->twilioService, $config);
9494
$channel = new TwilioChannel($twilio, $this->events);
9595

9696
$this->smsMessageWillBeSentToTwilioWith('+33333333333', [
9797
'from' => 'TwilioTest',
98-
'body' => 'Message text'
98+
'body' => 'Message text',
9999
]);
100100

101101
$channel->send(new NotifiableWithAlphanumericSender(), $this->notification);
@@ -108,13 +108,13 @@ public function it_can_make_a_call()
108108
$this->notification->shouldReceive('toTwilio')->andReturn($message);
109109

110110
$config = new TwilioConfig([
111-
'from' => '+31612345678'
111+
'from' => '+31612345678',
112112
]);
113113
$twilio = new Twilio($this->twilioService, $config);
114114
$channel = new TwilioChannel($twilio, $this->events);
115115

116116
$this->callWillBeSentToTwilioWith('+22222222222', '+31612345678', [
117-
'url' => 'http://example.com'
117+
'url' => 'http://example.com',
118118
]);
119119

120120
$channel->send(new NotifiableWithAttribute(), $this->notification);

tests/TwilioProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function it_gives_an_instantiated_twilio_object_when_the_channel_asks_for
4949

5050
$this->app->shouldReceive('make')->with(TwilioService::class, [
5151
$configArray['account_sid'],
52-
$configArray['auth_token']
52+
$configArray['auth_token'],
5353
])->andReturn($twilio);
5454

5555
$this->app->shouldReceive('when')->with(TwilioChannel::class)->once()->andReturn($this->app);

tests/TwilioTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function it_can_send_a_sms_message_to_twilio_with_alphanumeric_sender()
8888
->atLeast()->once()
8989
->with('+1111111111', [
9090
'from' => 'TwilioTest',
91-
'body' => 'Message text'
91+
'body' => 'Message text',
9292
])
9393
->andReturn(true);
9494

@@ -113,7 +113,7 @@ public function it_can_send_a_sms_message_to_twilio_with_messaging_service()
113113
->with('+1111111111', [
114114
'from' => '+1234567890',
115115
'body' => 'Message text',
116-
'messagingServiceSid' => 'service_sid'
116+
'messagingServiceSid' => 'service_sid',
117117
])
118118
->andReturn(true);
119119

@@ -129,7 +129,7 @@ public function it_can_send_a_call_to_twilio()
129129
$this->twilioService->calls->shouldReceive('create')
130130
->atLeast()->once()
131131
->with('+1111111111', '+2222222222', [
132-
'url' => 'http://example.com'
132+
'url' => 'http://example.com',
133133
])
134134
->andReturn(true);
135135

0 commit comments

Comments
 (0)