@@ -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; |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | public $smsParams; |
| 17 | 17 | |
| 18 | 18 | public function __construct( |
| 19 | - $freeSignName, $templateCode, $smsParams=null) |
|
| 19 | + $freeSignName, $templateCode, $smsParams = null) |
|
| 20 | 20 | { |
| 21 | 21 | $this->freeSignName = $freeSignName; |
| 22 | 22 | $this->templateCode = $templateCode; |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | public $isHtml; |
| 18 | 18 | |
| 19 | 19 | public function __construct( |
| 20 | - $subject, $accountName, $addressType=0, $replyToAddress=false, $isHtml = false) |
|
| 20 | + $subject, $accountName, $addressType = 0, $replyToAddress = false, $isHtml = false) |
|
| 21 | 21 | { |
| 22 | 22 | $this->subject = $subject; |
| 23 | 23 | $this->accountName = $accountName; |
@@ -138,7 +138,7 @@ |
||
| 138 | 138 | if ($callback != NULL) |
| 139 | 139 | { |
| 140 | 140 | return $this->client->sendAsync($request, $parameters)->then( |
| 141 | - function ($res) use (&$response, $callback) { |
|
| 141 | + function($res) use (&$response, $callback) { |
|
| 142 | 142 | try { |
| 143 | 143 | $response->parseResponse($res->getStatusCode(), $res->getBody()); |
| 144 | 144 | $callback->onSucceed($response); |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | } catch (\Exception $e) { |
| 51 | 51 | if ($exception != NULL) { |
| 52 | 52 | throw $exception; |
| 53 | - } elseif($e instanceof MnsException) { |
|
| 53 | + } elseif ($e instanceof MnsException) { |
|
| 54 | 54 | throw $e; |
| 55 | 55 | } else { |
| 56 | 56 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | } catch (\Exception $e) { |
| 84 | 84 | if ($exception != NULL) { |
| 85 | 85 | throw $exception; |
| 86 | - } elseif($e instanceof MnsException) { |
|
| 86 | + } elseif ($e instanceof MnsException) { |
|
| 87 | 87 | throw $e; |
| 88 | 88 | } else { |
| 89 | 89 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | } catch (\Exception $e) { |
| 44 | 44 | if ($exception != NULL) { |
| 45 | 45 | throw $exception; |
| 46 | - } elseif($e instanceof MnsException) { |
|
| 46 | + } elseif ($e instanceof MnsException) { |
|
| 47 | 47 | throw $e; |
| 48 | 48 | } else { |
| 49 | 49 | throw new MnsException($statusCode, $e->getMessage()); |