@@ -54,7 +54,7 @@ |
||
| 54 | 54 | } catch (\Exception $e) { |
| 55 | 55 | if ($exception != NULL) { |
| 56 | 56 | throw $exception; |
| 57 | - } elseif($e instanceof MnsException) { |
|
| 57 | + } elseif ($e instanceof MnsException) { |
|
| 58 | 58 | throw $e; |
| 59 | 59 | } else { |
| 60 | 60 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | } catch (\Exception $e) { |
| 61 | 61 | if ($exception != NULL) { |
| 62 | 62 | throw $exception; |
| 63 | - } elseif($e instanceof MnsException) { |
|
| 63 | + } elseif ($e instanceof MnsException) { |
|
| 64 | 64 | throw $e; |
| 65 | 65 | } else { |
| 66 | 66 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | } catch (\Exception $e) { |
| 48 | 48 | if ($exception != NULL) { |
| 49 | 49 | throw $exception; |
| 50 | - } elseif($e instanceof MnsException) { |
|
| 50 | + } elseif ($e instanceof MnsException) { |
|
| 51 | 51 | throw $e; |
| 52 | 52 | } else { |
| 53 | 53 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | } catch (\Exception $e) { |
| 96 | 96 | if ($exception != NULL) { |
| 97 | 97 | throw $exception; |
| 98 | - } elseif($e instanceof MnsException) { |
|
| 98 | + } elseif ($e instanceof MnsException) { |
|
| 99 | 99 | throw $e; |
| 100 | 100 | } else { |
| 101 | 101 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | } catch (\Exception $e) { |
| 33 | 33 | if ($exception != NULL) { |
| 34 | 34 | throw $exception; |
| 35 | - } elseif($e instanceof MnsException) { |
|
| 35 | + } elseif ($e instanceof MnsException) { |
|
| 36 | 36 | throw $e; |
| 37 | 37 | } else { |
| 38 | 38 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -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; |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | protected function registerConnector($manager) |
| 57 | 57 | { |
| 58 | - $manager->addConnector('mns', function () { |
|
| 58 | + $manager->addConnector('mns', function() { |
|
| 59 | 59 | return new MnsConnector(); |
| 60 | 60 | }); |
| 61 | 61 | } |
@@ -70,11 +70,11 @@ |
||
| 70 | 70 | } |
| 71 | 71 | $marker = $res->getNextMarker(); |
| 72 | 72 | if ($marker) { |
| 73 | - $this->question('---下一页:['.base64_decode($marker).']---'); |
|
| 73 | + $this->question('---下一页:[' . base64_decode($marker) . ']---'); |
|
| 74 | 74 | $this->listQueue($client, $prefix, $marker); |
| 75 | 75 | } |
| 76 | 76 | } catch (MnsException $e) { |
| 77 | - $this->error('查询队列失败:'.$e); |
|
| 77 | + $this->error('查询队列失败:' . $e); |
|
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | $client = new Client($config['endpoint'], $config['key'], $config['secret']); |
| 51 | 51 | $queue = $client->getQueueRef($queueName); |
| 52 | - $this->alert('队列:'.$queueName); |
|
| 52 | + $this->alert('队列:' . $queueName); |
|
| 53 | 53 | $this->info('拉取信息中...'); |
| 54 | 54 | |
| 55 | 55 | try { |
@@ -60,13 +60,13 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | foreach ($messages as $message) { |
| 62 | 62 | $this->info('------------'); |
| 63 | - $this->info('消息编号'.$message->getMessageId()); |
|
| 64 | - $this->info('消息正文的 MD5 值'.$message->getMessageBodyMD5()); |
|
| 65 | - $this->info('消息正文'.$message->getMessageBody()); |
|
| 66 | - $this->info('消息发送到队列的时间'.$message->getEnqueueTime()); |
|
| 67 | - $this->info('第一次被消费的时间'.$message->getFirstDequeueTime()); |
|
| 68 | - $this->info('总共被消费的次数'.$message->getDequeueCount()); |
|
| 69 | - $this->info('消息的优先级权值'.$message->getPriority()); |
|
| 63 | + $this->info('消息编号' . $message->getMessageId()); |
|
| 64 | + $this->info('消息正文的 MD5 值' . $message->getMessageBodyMD5()); |
|
| 65 | + $this->info('消息正文' . $message->getMessageBody()); |
|
| 66 | + $this->info('消息发送到队列的时间' . $message->getEnqueueTime()); |
|
| 67 | + $this->info('第一次被消费的时间' . $message->getFirstDequeueTime()); |
|
| 68 | + $this->info('总共被消费的次数' . $message->getDequeueCount()); |
|
| 69 | + $this->info('消息的优先级权值' . $message->getPriority()); |
|
| 70 | 70 | $this->info('------------'); |
| 71 | 71 | } |
| 72 | 72 | } |