@@ -15,6 +15,6 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function __toString() |
| 17 | 17 | { |
| 18 | - return 'CMQClientParameterException '.$this->get_info(); |
|
| 18 | + return 'CMQClientParameterException ' . $this->get_info(); |
|
| 19 | 19 | } |
| 20 | 20 | } |
@@ -59,19 +59,19 @@ |
||
| 59 | 59 | public function __toString() |
| 60 | 60 | { |
| 61 | 61 | $info = ['visibilityTimeout' => $this->visibilityTimeout, |
| 62 | - 'maxMsgHeapNum' => $this->maxMsgHeapNum, |
|
| 63 | - 'maxMsgSize' => $this->maxMsgSize, |
|
| 64 | - 'msgRetentionSeconds' => $this->msgRetentionSeconds, |
|
| 65 | - 'pollingWaitSeconds' => $this->pollingWaitSeconds, |
|
| 66 | - 'activeMsgNum' => $this->activeMsgNum, |
|
| 67 | - 'inactiveMsgNum' => $this->inactiveMsgNum, |
|
| 68 | - 'createTime' => date('Y-m-d H:i:s', $this->createTime), |
|
| 69 | - 'lastModifyTime' => date('Y-m-d H:i:s', $this->lastModifyTime), |
|
| 70 | - 'QueueName' => $this->queueName, |
|
| 71 | - 'rewindSeconds' => $this->rewindSeconds, |
|
| 72 | - 'rewindmsgNum' => $this->rewindmsgNum, |
|
| 73 | - 'minMsgTime' => $this->minMsgTime, |
|
| 74 | - 'delayMsgNum' => $this->delayMsgNum, ]; |
|
| 62 | + 'maxMsgHeapNum' => $this->maxMsgHeapNum, |
|
| 63 | + 'maxMsgSize' => $this->maxMsgSize, |
|
| 64 | + 'msgRetentionSeconds' => $this->msgRetentionSeconds, |
|
| 65 | + 'pollingWaitSeconds' => $this->pollingWaitSeconds, |
|
| 66 | + 'activeMsgNum' => $this->activeMsgNum, |
|
| 67 | + 'inactiveMsgNum' => $this->inactiveMsgNum, |
|
| 68 | + 'createTime' => date('Y-m-d H:i:s', $this->createTime), |
|
| 69 | + 'lastModifyTime' => date('Y-m-d H:i:s', $this->lastModifyTime), |
|
| 70 | + 'QueueName' => $this->queueName, |
|
| 71 | + 'rewindSeconds' => $this->rewindSeconds, |
|
| 72 | + 'rewindmsgNum' => $this->rewindmsgNum, |
|
| 73 | + 'minMsgTime' => $this->minMsgTime, |
|
| 74 | + 'delayMsgNum' => $this->delayMsgNum, ]; |
|
| 75 | 75 | |
| 76 | 76 | return json_encode($info); |
| 77 | 77 | } |
@@ -23,8 +23,8 @@ |
||
| 23 | 23 | public function __toString() |
| 24 | 24 | { |
| 25 | 25 | $info = ['status' => $this->status, |
| 26 | - 'header' => json_encode($this->header), |
|
| 27 | - 'data' => $this->data, ]; |
|
| 26 | + 'header' => json_encode($this->header), |
|
| 27 | + 'data' => $this->data, ]; |
|
| 28 | 28 | |
| 29 | 29 | return 'CMQServerNetworkException '.json_encode($info); |
| 30 | 30 | } |
@@ -26,6 +26,6 @@ |
||
| 26 | 26 | 'header' => json_encode($this->header), |
| 27 | 27 | 'data' => $this->data, ]; |
| 28 | 28 | |
| 29 | - return 'CMQServerNetworkException '.json_encode($info); |
|
| 29 | + return 'CMQServerNetworkException ' . json_encode($info); |
|
| 30 | 30 | } |
| 31 | 31 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | if (!$subscription_meta->bindindKey != null && is_array($subscription_meta->bindindKey) && !empty($subscription_meta->bindindKey)) { |
| 45 | 45 | $n = 1; |
| 46 | 46 | foreach ($subscription_meta->bindindKey as $tag) { |
| 47 | - $key = 'bindindKey.'.$n; |
|
| 47 | + $key = 'bindindKey.' . $n; |
|
| 48 | 48 | $params[$key] = $tag; |
| 49 | 49 | $n += 1; |
| 50 | 50 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | if (!$subscription_meta->FilterTag != null && is_array($subscription_meta->FilterTag) && !empty($subscription_meta->FilterTag)) { |
| 54 | 54 | $n = 1; |
| 55 | 55 | foreach ($subscription_meta->FilterTag as $tag) { |
| 56 | - $key = 'filterTag.'.$n; |
|
| 56 | + $key = 'filterTag.' . $n; |
|
| 57 | 57 | $params[$key] = $tag; |
| 58 | 58 | $n += 1; |
| 59 | 59 | } |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | if (!$subscription_meta->bindindKey != null && is_array($subscription_meta->bindindKey) && !empty($subscription_meta->bindindKey)) { |
| 166 | 166 | $n = 1; |
| 167 | 167 | foreach ($subscription_meta->bindindKey as $tag) { |
| 168 | - $key = 'bindindKey.'.$n; |
|
| 168 | + $key = 'bindindKey.' . $n; |
|
| 169 | 169 | $params[$key] = $tag; |
| 170 | 170 | $n += 1; |
| 171 | 171 | } |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | if (!$subscription_meta->FilterTag != null && is_array($subscription_meta->FilterTag) && !empty($subscription_meta->FilterTag)) { |
| 175 | 175 | $n = 1; |
| 176 | 176 | foreach ($subscription_meta->FilterTag as $tag) { |
| 177 | - $key = 'filterTag.'.$n; |
|
| 177 | + $key = 'filterTag.' . $n; |
|
| 178 | 178 | $params[$key] = $tag; |
| 179 | 179 | $n += 1; |
| 180 | 180 | } |
@@ -38,12 +38,12 @@ |
||
| 38 | 38 | public function __toString() |
| 39 | 39 | { |
| 40 | 40 | $info = ['msgBody' => $this->msgBody, |
| 41 | - 'msgId' => $this->msgId, |
|
| 42 | - 'enqueueTime' => date('Y-m-d H:i:s', $this->enqueueTime), |
|
| 43 | - 'nextVisibleTime' => date('Y-m-d H:i:s', $this->nextVisibleTime), |
|
| 44 | - 'firstDequeueTime' => date('Y-m-d H:i:s', $this->firstDequeueTime), |
|
| 45 | - 'dequeueCount' => $this->dequeueCount, |
|
| 46 | - 'receiptHandle' => $this->receiptHandle, ]; |
|
| 41 | + 'msgId' => $this->msgId, |
|
| 42 | + 'enqueueTime' => date('Y-m-d H:i:s', $this->enqueueTime), |
|
| 43 | + 'nextVisibleTime' => date('Y-m-d H:i:s', $this->nextVisibleTime), |
|
| 44 | + 'firstDequeueTime' => date('Y-m-d H:i:s', $this->firstDequeueTime), |
|
| 45 | + 'dequeueCount' => $this->dequeueCount, |
|
| 46 | + 'receiptHandle' => $this->receiptHandle, ]; |
|
| 47 | 47 | |
| 48 | 48 | return json_encode($info); |
| 49 | 49 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | return ['totalCount' => $ret_pkg['totalCount'], |
| 132 | - 'queueList' => $ret_pkg['queueList'], 'next_offset' => $next_offset, ]; |
|
| 132 | + 'queueList' => $ret_pkg['queueList'], 'next_offset' => $next_offset, ]; |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /* 列出Account的主题 |
@@ -171,8 +171,8 @@ discard block |
||
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | return ['totalCoult' => $resp['totalCount'], |
| 174 | - 'topicList' => $resp['topicList'], |
|
| 175 | - 'next_offset' => $next_offset, ]; |
|
| 174 | + 'topicList' => $resp['topicList'], |
|
| 175 | + 'next_offset' => $next_offset, ]; |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | /* 获取Account的一个Topic对象 |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | if ($offset == '') { |
| 123 | 123 | $next_offset = count($ret_pkg['queueList']); |
| 124 | 124 | } else { |
| 125 | - $next_offset = (int) $offset + count($ret_pkg['queueList']); |
|
| 125 | + $next_offset = (int)$offset + count($ret_pkg['queueList']); |
|
| 126 | 126 | } |
| 127 | 127 | if ($next_offset >= $ret_pkg['totalCount']) { |
| 128 | 128 | $next_offset = ''; |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | if ($offset == '') { |
| 165 | 165 | $next_offset = count($resp['topicList']); |
| 166 | 166 | } else { |
| 167 | - $next_offset = (int) $offset + count($resp['topicList']); |
|
| 167 | + $next_offset = (int)$offset + count($resp['topicList']); |
|
| 168 | 168 | } |
| 169 | 169 | if ($next_offset >= $resp['totalCount']) { |
| 170 | 170 | $next_offset = ''; |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | } elseif (strpos($host, 'https://') === 0) { |
| 31 | 31 | $_host = substr($host, 8, strlen($host) - 8); |
| 32 | 32 | } else { |
| 33 | - throw new CMQClientParameterException('Only support http(s) prototol. Invalid endpoint:'.$host); |
|
| 33 | + throw new CMQClientParameterException('Only support http(s) prototol. Invalid endpoint:' . $host); |
|
| 34 | 34 | } |
| 35 | 35 | if ($_host[strlen($_host) - 1] == '/') { |
| 36 | 36 | $this->host = substr($_host, 0, strlen($_host) - 1); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } elseif ($sign_method == 'sha256') { |
| 47 | 47 | $this->sign_method = 'HmacSHA256'; |
| 48 | 48 | } else { |
| 49 | - throw new CMQClientParameterException('Only support sign method HmasSHA256 or HmacSHA1 . Invalid sign method:'.$sign_method); |
|
| 49 | + throw new CMQClientParameterException('Only support sign method HmasSHA256 or HmacSHA1 . Invalid sign method:' . $sign_method); |
|
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $iTimeout = 0; |
| 81 | 81 | |
| 82 | 82 | if (array_key_exists('UserpollingWaitSeconds', $params)) { |
| 83 | - $iTimeout = (int) $params['UserpollingWaitSeconds']; |
|
| 83 | + $iTimeout = (int)$params['UserpollingWaitSeconds']; |
|
| 84 | 84 | } |
| 85 | 85 | // send request |
| 86 | 86 | $resp_inter = $this->http->send_request($req_inter, $iTimeout); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | $this->connection_timeout = $connection_timeout; |
| 14 | 14 | $this->keep_alive = $keep_alive; |
| 15 | - $this->host = $host.''.'/v2/index.php'; |
|
| 15 | + $this->host = $host . '' . '/v2/index.php'; |
|
| 16 | 16 | $this->curl = null; |
| 17 | 17 | } |
| 18 | 18 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | curl_setopt($this->curl, CURLOPT_POST, 1); |
| 56 | 56 | curl_setopt($this->curl, CURLOPT_POSTFIELDS, $req_inter->data); |
| 57 | 57 | } else { |
| 58 | - $url .= $req_inter->uri.'?'.$req_inter->data; |
|
| 58 | + $url .= $req_inter->uri . '?' . $req_inter->data; |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | if (isset($req_inter->header)) { |
@@ -21,8 +21,8 @@ |
||
| 21 | 21 | public function __toString() |
| 22 | 22 | { |
| 23 | 23 | $info = ['status' => $this->status, |
| 24 | - 'header' => json_encode($this->header), |
|
| 25 | - 'data' => $this->data, ]; |
|
| 24 | + 'header' => json_encode($this->header), |
|
| 25 | + 'data' => $this->data, ]; |
|
| 26 | 26 | |
| 27 | 27 | return json_encode($info); |
| 28 | 28 | } |