@@ -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()); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | } catch (\Exception $e) { |
50 | 50 | if ($exception != NULL) { |
51 | 51 | throw $exception; |
52 | - } elseif($e instanceof MnsException) { |
|
52 | + } elseif ($e instanceof MnsException) { |
|
53 | 53 | throw $e; |
54 | 54 | } else { |
55 | 55 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | while ($xmlReader->read()) |
66 | 66 | { |
67 | 67 | if ($xmlReader->nodeType == \XMLReader::ELEMENT && $xmlReader->name == Constants::ERROR) { |
68 | - $ex->addDeleteMessageErrorItem( DeleteMessageErrorItem::fromXML($xmlReader)); |
|
68 | + $ex->addDeleteMessageErrorItem(DeleteMessageErrorItem::fromXML($xmlReader)); |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | throw $ex; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | } catch (\Exception $e) { |
74 | 74 | if ($exception != NULL) { |
75 | 75 | throw $exception; |
76 | - } elseif($e instanceof MnsException) { |
|
76 | + } elseif ($e instanceof MnsException) { |
|
77 | 77 | throw $e; |
78 | 78 | } else { |
79 | 79 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | while ($xmlReader->read()) |
90 | 90 | { |
91 | 91 | if ($xmlReader->nodeType == \XMLReader::ELEMENT && $xmlReader->name == 'Message') { |
92 | - $ex->addSendMessageResponseItem( SendMessageResponseItem::fromXML($xmlReader)); |
|
92 | + $ex->addSendMessageResponseItem(SendMessageResponseItem::fromXML($xmlReader)); |
|
93 | 93 | } |
94 | 94 | } |
95 | 95 | throw $ex; |