@@ -68,8 +68,7 @@ |
||
| 68 | 68 | if ($phone) |
| 69 | 69 | { |
| 70 | 70 | return "sms:directsms:" . $phone; |
| 71 | - } |
|
| 72 | - else |
|
| 71 | + } else |
|
| 73 | 72 | { |
| 74 | 73 | return "sms:directsms:anonymous"; |
| 75 | 74 | } |
@@ -16,8 +16,7 @@ |
||
| 16 | 16 | if ($code >= 500) |
| 17 | 17 | { |
| 18 | 18 | $mnsErrorCode = "ServerError"; |
| 19 | - } |
|
| 20 | - else |
|
| 19 | + } else |
|
| 21 | 20 | { |
| 22 | 21 | $mnsErrorCode = "ClientError"; |
| 23 | 22 | } |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | class Config |
| 5 | 5 | { |
| 6 | 6 | //private $maxAttempts; |
| 7 | - private $proxy; // http://username:[email protected]:10 |
|
| 7 | + private $proxy; // http://username:[email protected]:10 |
|
| 8 | 8 | private $connectTimeout; |
| 9 | 9 | private $requestTimeout; |
| 10 | 10 | private $expectContinue; |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | // $this->maxAttempts = 3; |
| 15 | 15 | $this->proxy = NULL; |
| 16 | 16 | $this->requestTimeout = 35; // 35 seconds |
| 17 | - $this->connectTimeout = 3; // 3 seconds |
|
| 17 | + $this->connectTimeout = 3; // 3 seconds |
|
| 18 | 18 | $this->expectContinue = false; |
| 19 | 19 | } |
| 20 | 20 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | } |
| 43 | 43 | ksort($tmpHeaders); |
| 44 | 44 | |
| 45 | - $canonicalizedMNSHeaders = implode("\n", array_map(function ($v, $k) { return $k . ":" . $v; }, $tmpHeaders, array_keys($tmpHeaders))); |
|
| 45 | + $canonicalizedMNSHeaders = implode("\n", array_map(function($v, $k) { return $k . ":" . $v; }, $tmpHeaders, array_keys($tmpHeaders))); |
|
| 46 | 46 | |
| 47 | 47 | $stringToSign = strtoupper($request->getMethod()) . "\n" . $contentMd5 . "\n" . $contentType . "\n" . $date . "\n" . $canonicalizedMNSHeaders . "\n" . $canonicalizedResource; |
| 48 | 48 | |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | public $receiver; |
| 18 | 18 | |
| 19 | 19 | public function __construct( |
| 20 | - $freeSignName, $templateCode, $smsParams=array(), $receiver=null) |
|
| 20 | + $freeSignName, $templateCode, $smsParams = array(), $receiver = null) |
|
| 21 | 21 | { |
| 22 | 22 | $this->freeSignName = $freeSignName; |
| 23 | 23 | $this->templateCode = $templateCode; |
@@ -154,8 +154,7 @@ |
||
| 154 | 154 | if ($loggingEnabled == "True") |
| 155 | 155 | { |
| 156 | 156 | $loggingEnabled = True; |
| 157 | - } |
|
| 158 | - else |
|
| 157 | + } else |
|
| 159 | 158 | { |
| 160 | 159 | $loggingEnabled = False; |
| 161 | 160 | } |
@@ -277,8 +277,7 @@ |
||
| 277 | 277 | if ($loggingEnabled == "True") |
| 278 | 278 | { |
| 279 | 279 | $loggingEnabled = True; |
| 280 | - } |
|
| 281 | - else |
|
| 280 | + } else |
|
| 282 | 281 | { |
| 283 | 282 | $loggingEnabled = False; |
| 284 | 283 | } |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | $subAttributes->writeXML($xmlWriter); |
| 42 | 42 | } |
| 43 | - } |
|
| 44 | - else |
|
| 43 | + } else |
|
| 45 | 44 | { |
| 46 | 45 | $this->attributes->writeXML($xmlWriter); |
| 47 | 46 | } |
@@ -23,8 +23,7 @@ discard block |
||
| 23 | 23 | { |
| 24 | 24 | $this->messageId = $param1; |
| 25 | 25 | $this->messageBodyMD5 = $param2; |
| 26 | - } |
|
| 27 | - else |
|
| 26 | + } else |
|
| 28 | 27 | { |
| 29 | 28 | $this->errorCode = $param1; |
| 30 | 29 | $this->errorMessage = $param2; |
@@ -95,8 +94,7 @@ discard block |
||
| 95 | 94 | if ($messageId != NULL) |
| 96 | 95 | { |
| 97 | 96 | return new SendMessageResponseItem(TRUE, $messageId, $messageBodyMD5); |
| 98 | - } |
|
| 99 | - else |
|
| 97 | + } else |
|
| 100 | 98 | { |
| 101 | 99 | return new SendMessageResponseItem(FALSE, $errorCode, $errorMessage); |
| 102 | 100 | } |
@@ -108,8 +106,7 @@ discard block |
||
| 108 | 106 | if ($messageId != NULL) |
| 109 | 107 | { |
| 110 | 108 | return new SendMessageResponseItem(TRUE, $messageId, $messageBodyMD5); |
| 111 | - } |
|
| 112 | - else |
|
| 109 | + } else |
|
| 113 | 110 | { |
| 114 | 111 | return new SendMessageResponseItem(FALSE, $errorCode, $errorMessage); |
| 115 | 112 | } |