@@ -50,7 +50,7 @@ |
||
| 50 | 50 | { |
| 51 | 51 | $attributes = $this->getQueue($queue)->get_attributes(); |
| 52 | 52 | |
| 53 | - return (int) $attributes->activeMsgNum; |
|
| 53 | + return (int)$attributes->activeMsgNum; |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | /** |
@@ -11,6 +11,6 @@ |
||
| 11 | 11 | |
| 12 | 12 | public function __toString() |
| 13 | 13 | { |
| 14 | - return 'CMQClientException '.$this->get_info(); |
|
| 14 | + return 'CMQClientException ' . $this->get_info(); |
|
| 15 | 15 | } |
| 16 | 16 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | if ($vTagList != null && is_array($vTagList) && !empty($vTagList)) { |
| 139 | 139 | $n = 1; |
| 140 | 140 | foreach ($vTagList as $tag) { |
| 141 | - $key = 'msgTag.'.$n; |
|
| 141 | + $key = 'msgTag.' . $n; |
|
| 142 | 142 | $params[$key] = $tag; |
| 143 | 143 | $n += 1; |
| 144 | 144 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $n = 1; |
| 179 | 179 | if (is_array($vmessageList) && !empty($vmessageList)) { |
| 180 | 180 | foreach ($vmessageList as $msg) { |
| 181 | - $key = 'msgBody.'.$n; |
|
| 181 | + $key = 'msgBody.' . $n; |
|
| 182 | 182 | if ($this->encoding) { |
| 183 | 183 | $params[$key] = base64_encode($msg); |
| 184 | 184 | } else { |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | if ($vtagList != null && is_array($vtagList) && !empty($vtagList)) { |
| 191 | 191 | $n = 1; |
| 192 | 192 | foreach ($vtagList as $tag) { |
| 193 | - $key = 'msgTag.'.$n; |
|
| 193 | + $key = 'msgTag.' . $n; |
|
| 194 | 194 | $params[$key] = $tag; |
| 195 | 195 | $n += 1; |
| 196 | 196 | } |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | if ($offset == '') { |
| 231 | 231 | $next_offset = count($resp['subscriptionList']); |
| 232 | 232 | } else { |
| 233 | - $next_offset = (int) $offset + count($resp['subscriptionList']); |
|
| 233 | + $next_offset = (int)$offset + count($resp['subscriptionList']); |
|
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | if ($next_offset >= $resp['totalCount']) { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $retStr = base64_encode(hash_hmac('sha256', $srcStr, $secretKey, true)); |
| 33 | 33 | break; |
| 34 | 34 | default: |
| 35 | - throw new Exception($method.' is not a supported encrypt method'); |
|
| 35 | + throw new Exception($method . ' is not a supported encrypt method'); |
|
| 36 | 36 | break; |
| 37 | 37 | } |
| 38 | 38 | |
@@ -54,12 +54,12 @@ discard block |
||
| 54 | 54 | $requestMethod = 'POST', $requestHost = '', |
| 55 | 55 | $requestPath = '/v2/index.php') |
| 56 | 56 | { |
| 57 | - $url = $requestHost.$requestPath; |
|
| 57 | + $url = $requestHost . $requestPath; |
|
| 58 | 58 | |
| 59 | 59 | // 取出所有的参数 |
| 60 | 60 | $paramStr = self::_buildParamStr($requestParams, $requestMethod); |
| 61 | 61 | |
| 62 | - $plainText = $requestMethod.$url.$paramStr; |
|
| 62 | + $plainText = $requestMethod . $url . $paramStr; |
|
| 63 | 63 | |
| 64 | 64 | return $plainText; |
| 65 | 65 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | } else { |
| 97 | 97 | $paramStr .= '&'; |
| 98 | 98 | } |
| 99 | - $paramStr .= $key.'='.$value; |
|
| 99 | + $paramStr .= $key . '=' . $value; |
|
| 100 | 100 | $i++; |
| 101 | 101 | } |
| 102 | 102 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | |
| 32 | 32 | public function __toString() |
| 33 | 33 | { |
| 34 | - return 'CMQExceptionBase '.$this->get_info(); |
|
| 34 | + return 'CMQExceptionBase ' . $this->get_info(); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | public function get_info() |
@@ -15,6 +15,6 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function __toString() |
| 17 | 17 | { |
| 18 | - return 'CMQClientNetworkException '.$this->get_info(); |
|
| 18 | + return 'CMQClientNetworkException ' . $this->get_info(); |
|
| 19 | 19 | } |
| 20 | 20 | } |
@@ -33,6 +33,6 @@ |
||
| 33 | 33 | |
| 34 | 34 | public function __toString() |
| 35 | 35 | { |
| 36 | - return 'CMQServerException '.$this->get_info().', RequestID:'.$this->request_id; |
|
| 36 | + return 'CMQServerException ' . $this->get_info() . ', RequestID:' . $this->request_id; |
|
| 37 | 37 | } |
| 38 | 38 | } |
@@ -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 | } |
@@ -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 | } |