Skip to content

Commit 4c36bab

Browse files
authored
Merge pull request #40 from laravel-notification-channels/analysis-XZmBBR
Apply fixes from StyleCI
2 parents 6164d78 + 24104cd commit 4c36bab

9 files changed

+41
-41
lines changed

src/Exceptions/CouldNotSendNotification.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace NotificationChannels\Twilio\Exceptions;
44

5-
use NotificationChannels\Twilio\CallMessage;
65
use NotificationChannels\Twilio\SmsMessage;
6+
use NotificationChannels\Twilio\CallMessage;
77

88
class CouldNotSendNotification extends \Exception
99
{

src/Twilio.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace NotificationChannels\Twilio;
44

5-
use NotificationChannels\Twilio\Exceptions\CouldNotSendNotification;
65
use Twilio\Rest\Client as TwilioService;
6+
use NotificationChannels\Twilio\Exceptions\CouldNotSendNotification;
77

88
class Twilio
99
{
@@ -124,7 +124,5 @@ protected function getAlphanumericSender()
124124
if ($sender = $this->config->getAlphanumericSender()) {
125125
return $sender;
126126
}
127-
128-
return null;
129127
}
130128
}

src/TwilioChannel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
use Exception;
66
use Illuminate\Notifications\Notification;
77
use Illuminate\Contracts\Events\Dispatcher;
8-
use NotificationChannels\Twilio\Exceptions\CouldNotSendNotification;
98
use Illuminate\Notifications\Events\NotificationFailed;
9+
use NotificationChannels\Twilio\Exceptions\CouldNotSendNotification;
1010

1111
class TwilioChannel
1212
{

src/TwilioConfig.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,24 @@ public function getAuthToken()
2929
return $this->config['auth_token'];
3030
}
3131

32-
/**
33-
* Get the username.
34-
*
35-
* @return string
36-
*/
37-
public function getUsername()
32+
/**
33+
* Get the username.
34+
*
35+
* @return string
36+
*/
37+
public function getUsername()
3838
{
39-
return $this->config['username'];
39+
return $this->config['username'];
4040
}
4141

42-
/**
43-
* Get the password.
44-
*
45-
* @return string
46-
*/
47-
public function getPassword()
42+
/**
43+
* Get the password.
44+
*
45+
* @return string
46+
*/
47+
public function getPassword()
4848
{
49-
return $this->config['password'];
49+
return $this->config['password'];
5050
}
5151

5252
/**

src/TwilioProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ public function boot()
2525
$config = $this->app['config']['services.twilio'];
2626
$account_sid = array_get($config, 'account_sid');
2727
$username = array_get($config, 'username');
28-
if (!empty($username)) {
28+
if (! empty($username)) {
2929
$password = array_get($config, 'password');
30+
3031
return new TwilioService($username, $password, $account_sid);
3132
} else {
3233
$auth_token = array_get($config, 'auth_token');
34+
3335
return new TwilioService($account_sid, $auth_token);
3436
}
3537
});

tests/IntegrationTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
namespace NotificationChannels\Twilio\Test;
44

5-
use Illuminate\Contracts\Events\Dispatcher;
6-
use Illuminate\Notifications\Notification;
75
use Mockery;
8-
use Mockery\Adapter\Phpunit\MockeryTestCase;
9-
use NotificationChannels\Twilio\TwilioCallMessage;
10-
use NotificationChannels\Twilio\TwilioChannel;
11-
use NotificationChannels\Twilio\TwilioConfig;
12-
use NotificationChannels\Twilio\TwilioSmsMessage;
136
use NotificationChannels\Twilio\Twilio;
147
use Twilio\Rest\Client as TwilioService;
15-
use Twilio\Rest\Api\V2010\Account\MessageList;
8+
use Illuminate\Notifications\Notification;
9+
use Illuminate\Contracts\Events\Dispatcher;
1610
use Twilio\Rest\Api\V2010\Account\CallList;
11+
use Mockery\Adapter\Phpunit\MockeryTestCase;
12+
use NotificationChannels\Twilio\TwilioConfig;
13+
use NotificationChannels\Twilio\TwilioChannel;
14+
use Twilio\Rest\Api\V2010\Account\MessageList;
15+
use NotificationChannels\Twilio\TwilioSmsMessage;
16+
use NotificationChannels\Twilio\TwilioCallMessage;
1717

1818
class IntegrationTest extends MockeryTestCase
1919
{

tests/TwilioChannelTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
namespace NotificationChannels\Twilio\Test;
44

5-
use Illuminate\Contracts\Events\Dispatcher;
6-
use Illuminate\Notifications\Events\NotificationFailed;
75
use Mockery;
6+
use NotificationChannels\Twilio\Twilio;
87
use Illuminate\Notifications\Notification;
8+
use Illuminate\Contracts\Events\Dispatcher;
99
use Mockery\Adapter\Phpunit\MockeryTestCase;
10-
use NotificationChannels\Twilio\TwilioCallMessage;
1110
use NotificationChannels\Twilio\TwilioChannel;
1211
use NotificationChannels\Twilio\TwilioSmsMessage;
13-
use NotificationChannels\Twilio\Twilio;
12+
use NotificationChannels\Twilio\TwilioCallMessage;
13+
use Illuminate\Notifications\Events\NotificationFailed;
1414

1515
class TwilioChannelTest extends MockeryTestCase
1616
{

tests/TwilioProviderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
use Mockery;
66
use ArrayAccess;
7+
use NotificationChannels\Twilio\Twilio;
78
use Twilio\Rest\Client as TwilioService;
89
use Mockery\Adapter\Phpunit\MockeryTestCase;
9-
use NotificationChannels\Twilio\Twilio;
10-
use NotificationChannels\Twilio\TwilioChannel;
1110
use NotificationChannels\Twilio\TwilioConfig;
11+
use NotificationChannels\Twilio\TwilioChannel;
1212
use NotificationChannels\Twilio\TwilioProvider;
1313
use Illuminate\Contracts\Foundation\Application;
1414

tests/TwilioTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
namespace NotificationChannels\Twilio\Test;
44

5-
use Illuminate\Contracts\Events\Dispatcher;
65
use Mockery;
6+
use Services_Twilio_Rest_Calls;
7+
use Services_Twilio_Rest_Messages;
8+
use NotificationChannels\Twilio\Twilio;
9+
use Twilio\Rest\Client as TwilioService;
10+
use Illuminate\Contracts\Events\Dispatcher;
711
use Mockery\Adapter\Phpunit\MockeryTestCase;
8-
use NotificationChannels\Twilio\Exceptions\CouldNotSendNotification;
912
use NotificationChannels\Twilio\TwilioConfig;
1013
use NotificationChannels\Twilio\TwilioMessage;
11-
use NotificationChannels\Twilio\TwilioCallMessage;
1214
use NotificationChannels\Twilio\TwilioSmsMessage;
13-
use NotificationChannels\Twilio\Twilio;
14-
use Services_Twilio_Rest_Calls;
15-
use Services_Twilio_Rest_Messages;
16-
use Twilio\Rest\Client as TwilioService;
15+
use NotificationChannels\Twilio\TwilioCallMessage;
16+
use NotificationChannels\Twilio\Exceptions\CouldNotSendNotification;
1717

1818
class TwilioTest extends MockeryTestCase
1919
{

0 commit comments

Comments
 (0)