Completed
Push — master ( d77182...b3448d )
by Keal
02:40
created
tests/SmsTest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 
11 11
 use LaravelSms\sms\Sms;
12 12
 use PHPUnit_Framework_TestCase;
13
-use Mockery as m;
14 13
 
15 14
 class SmsTest extends PHPUnit_Framework_TestCase
16 15
 {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     {
43 43
         $this->sms->to('123456...');
44 44
         $smsData = $this->smsData();
45
-        $this->assertEquals('123456...',$smsData['to']);
45
+        $this->assertEquals('123456...', $smsData['to']);
46 46
     }
47 47
 
48 48
     public function testSetContent()
Please login to merge, or discard this patch.
src/sms/Sms.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
      * @param null $tempId
73 73
      * @return $this
74 74
      */
75
-    public function template($agentName='SMS_AGENT', $tempId = null)
75
+    public function template($agentName = 'SMS_AGENT', $tempId = null)
76 76
     {
77
-        if ($agentName === 'SMS_AGENT'){
77
+        if ($agentName === 'SMS_AGENT') {
78 78
             $agentName = $this->config;
79 79
         }
80 80
         if (is_array($agentName)) {
@@ -107,10 +107,10 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function send()
109 109
     {
110
-        if($this->config=='YunTongXun'){
111
-            $rest=new Rest(config('sms.agents.'.$this->config));
112
-            return $rest->sendTemplateSMS($this->smsData['to'],$this->smsData['templateData'],$this->smsData['templates']['YunTongXun']);
113
-        }else{
110
+        if ($this->config == 'YunTongXun') {
111
+            $rest = new Rest(config('sms.agents.' . $this->config));
112
+            return $rest->sendTemplateSMS($this->smsData['to'], $this->smsData['templateData'], $this->smsData['templates']['YunTongXun']);
113
+        } else {
114 114
             throw new \Exception('make sure you have choose a right agent');
115 115
         }
116 116
     }
Please login to merge, or discard this patch.