File tree Expand file tree Collapse file tree 9 files changed +41
-41
lines changed
Expand file tree Collapse file tree 9 files changed +41
-41
lines changed Original file line number Diff line number Diff line change 22
33namespace NotificationChannels \Twilio \Exceptions ;
44
5- use NotificationChannels \Twilio \CallMessage ;
65use NotificationChannels \Twilio \SmsMessage ;
6+ use NotificationChannels \Twilio \CallMessage ;
77
88class CouldNotSendNotification extends \Exception
99{
Original file line number Diff line number Diff line change 22
33namespace NotificationChannels \Twilio ;
44
5- use NotificationChannels \Twilio \Exceptions \CouldNotSendNotification ;
65use Twilio \Rest \Client as TwilioService ;
6+ use NotificationChannels \Twilio \Exceptions \CouldNotSendNotification ;
77
88class 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}
Original file line number Diff line number Diff line change 55use Exception ;
66use Illuminate \Notifications \Notification ;
77use Illuminate \Contracts \Events \Dispatcher ;
8- use NotificationChannels \Twilio \Exceptions \CouldNotSendNotification ;
98use Illuminate \Notifications \Events \NotificationFailed ;
9+ use NotificationChannels \Twilio \Exceptions \CouldNotSendNotification ;
1010
1111class TwilioChannel
1212{
Original file line number Diff line number Diff 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 /**
Original file line number Diff line number Diff 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 });
Original file line number Diff line number Diff line change 22
33namespace NotificationChannels \Twilio \Test ;
44
5- use Illuminate \Contracts \Events \Dispatcher ;
6- use Illuminate \Notifications \Notification ;
75use 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 ;
136use NotificationChannels \Twilio \Twilio ;
147use Twilio \Rest \Client as TwilioService ;
15- use Twilio \Rest \Api \V2010 \Account \MessageList ;
8+ use Illuminate \Notifications \Notification ;
9+ use Illuminate \Contracts \Events \Dispatcher ;
1610use 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
1818class IntegrationTest extends MockeryTestCase
1919{
Original file line number Diff line number Diff line change 22
33namespace NotificationChannels \Twilio \Test ;
44
5- use Illuminate \Contracts \Events \Dispatcher ;
6- use Illuminate \Notifications \Events \NotificationFailed ;
75use Mockery ;
6+ use NotificationChannels \Twilio \Twilio ;
87use Illuminate \Notifications \Notification ;
8+ use Illuminate \Contracts \Events \Dispatcher ;
99use Mockery \Adapter \Phpunit \MockeryTestCase ;
10- use NotificationChannels \Twilio \TwilioCallMessage ;
1110use NotificationChannels \Twilio \TwilioChannel ;
1211use NotificationChannels \Twilio \TwilioSmsMessage ;
13- use NotificationChannels \Twilio \Twilio ;
12+ use NotificationChannels \Twilio \TwilioCallMessage ;
13+ use Illuminate \Notifications \Events \NotificationFailed ;
1414
1515class TwilioChannelTest extends MockeryTestCase
1616{
Original file line number Diff line number Diff line change 44
55use Mockery ;
66use ArrayAccess ;
7+ use NotificationChannels \Twilio \Twilio ;
78use Twilio \Rest \Client as TwilioService ;
89use Mockery \Adapter \Phpunit \MockeryTestCase ;
9- use NotificationChannels \Twilio \Twilio ;
10- use NotificationChannels \Twilio \TwilioChannel ;
1110use NotificationChannels \Twilio \TwilioConfig ;
11+ use NotificationChannels \Twilio \TwilioChannel ;
1212use NotificationChannels \Twilio \TwilioProvider ;
1313use Illuminate \Contracts \Foundation \Application ;
1414
Original file line number Diff line number Diff line change 22
33namespace NotificationChannels \Twilio \Test ;
44
5- use Illuminate \Contracts \Events \Dispatcher ;
65use 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 ;
711use Mockery \Adapter \Phpunit \MockeryTestCase ;
8- use NotificationChannels \Twilio \Exceptions \CouldNotSendNotification ;
912use NotificationChannels \Twilio \TwilioConfig ;
1013use NotificationChannels \Twilio \TwilioMessage ;
11- use NotificationChannels \Twilio \TwilioCallMessage ;
1214use 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
1818class TwilioTest extends MockeryTestCase
1919{
You can’t perform that action at this time.
0 commit comments