@@ -59,7 +59,7 @@ |
||
| 59 | 59 | } catch (\Exception $e) { |
| 60 | 60 | if ($exception != NULL) { |
| 61 | 61 | throw $exception; |
| 62 | - } elseif($e instanceof MnsException) { |
|
| 62 | + } elseif ($e instanceof MnsException) { |
|
| 63 | 63 | throw $e; |
| 64 | 64 | } else { |
| 65 | 65 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | } catch (\Exception $e) { |
| 72 | 72 | if ($exception != NULL) { |
| 73 | 73 | throw $exception; |
| 74 | - } elseif($e instanceof MnsException) { |
|
| 74 | + } elseif ($e instanceof MnsException) { |
|
| 75 | 75 | throw $e; |
| 76 | 76 | } else { |
| 77 | 77 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | } catch (\Exception $e) { |
| 35 | 35 | if ($exception != NULL) { |
| 36 | 36 | throw $exception; |
| 37 | - } elseif($e instanceof MnsException) { |
|
| 37 | + } elseif ($e instanceof MnsException) { |
|
| 38 | 38 | throw $e; |
| 39 | 39 | } else { |
| 40 | 40 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -17,8 +17,7 @@ |
||
| 17 | 17 | if ($statusCode == 204) |
| 18 | 18 | { |
| 19 | 19 | $this->succeed = TRUE; |
| 20 | - } |
|
| 21 | - else |
|
| 20 | + } else |
|
| 22 | 21 | { |
| 23 | 22 | $this->parseErrorResponse($statusCode, $content); |
| 24 | 23 | } |
@@ -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; |
@@ -28,8 +28,7 @@ discard block |
||
| 28 | 28 | if ($statusCode == 200) |
| 29 | 29 | { |
| 30 | 30 | $this->succeed = TRUE; |
| 31 | - } |
|
| 32 | - else |
|
| 31 | + } else |
|
| 33 | 32 | { |
| 34 | 33 | $this->parseErrorResponse($statusCode, $content); |
| 35 | 34 | } |
@@ -39,12 +38,10 @@ discard block |
||
| 39 | 38 | try |
| 40 | 39 | { |
| 41 | 40 | $this->attributes = SubscriptionAttributes::fromXML($xmlReader); |
| 42 | - } |
|
| 43 | - catch (\Exception $e) |
|
| 41 | + } catch (\Exception $e) |
|
| 44 | 42 | { |
| 45 | 43 | throw new MnsException($statusCode, $e->getMessage(), $e); |
| 46 | - } |
|
| 47 | - catch (\Throwable $t) |
|
| 44 | + } catch (\Throwable $t) |
|
| 48 | 45 | { |
| 49 | 46 | throw new MnsException($statusCode, $t->getMessage()); |
| 50 | 47 | } |
@@ -63,23 +60,19 @@ discard block |
||
| 63 | 60 | throw new SubscriptionNotExistException($statusCode, $result['Message'], $exception, $result['Code'], $result['RequestId'], $result['HostId']); |
| 64 | 61 | } |
| 65 | 62 | throw new MnsException($statusCode, $result['Message'], $exception, $result['Code'], $result['RequestId'], $result['HostId']); |
| 66 | - } |
|
| 67 | - catch (\Exception $e) |
|
| 63 | + } catch (\Exception $e) |
|
| 68 | 64 | { |
| 69 | 65 | if ($exception != NULL) |
| 70 | 66 | { |
| 71 | 67 | throw $exception; |
| 72 | - } |
|
| 73 | - elseif ($e instanceof MnsException) |
|
| 68 | + } elseif ($e instanceof MnsException) |
|
| 74 | 69 | { |
| 75 | 70 | throw $e; |
| 76 | - } |
|
| 77 | - else |
|
| 71 | + } else |
|
| 78 | 72 | { |
| 79 | 73 | throw new MnsException($statusCode, $e->getMessage()); |
| 80 | 74 | } |
| 81 | - } |
|
| 82 | - catch (\Throwable $t) |
|
| 75 | + } catch (\Throwable $t) |
|
| 83 | 76 | { |
| 84 | 77 | throw new MnsException($statusCode, $t->getMessage()); |
| 85 | 78 | } |
@@ -69,7 +69,7 @@ |
||
| 69 | 69 | } catch (\Exception $e) { |
| 70 | 70 | if ($exception != NULL) { |
| 71 | 71 | throw $exception; |
| 72 | - } elseif($e instanceof MnsException) { |
|
| 72 | + } elseif ($e instanceof MnsException) { |
|
| 73 | 73 | throw $e; |
| 74 | 74 | } else { |
| 75 | 75 | throw new MnsException($statusCode, $e->getMessage()); |
@@ -40,23 +40,19 @@ |
||
| 40 | 40 | throw new TopicNotExistException($statusCode, $result['Message'], $exception, $result['Code'], $result['RequestId'], $result['HostId']); |
| 41 | 41 | } |
| 42 | 42 | throw new MnsException($statusCode, $result['Message'], $exception, $result['Code'], $result['RequestId'], $result['HostId']); |
| 43 | - } |
|
| 44 | - catch (\Exception $e) |
|
| 43 | + } catch (\Exception $e) |
|
| 45 | 44 | { |
| 46 | 45 | if ($exception != NULL) |
| 47 | 46 | { |
| 48 | 47 | throw $exception; |
| 49 | - } |
|
| 50 | - elseif ($e instanceof MnsException) |
|
| 48 | + } elseif ($e instanceof MnsException) |
|
| 51 | 49 | { |
| 52 | 50 | throw $e; |
| 53 | - } |
|
| 54 | - else |
|
| 51 | + } else |
|
| 55 | 52 | { |
| 56 | 53 | throw new MnsException($statusCode, $e->getMessage()); |
| 57 | 54 | } |
| 58 | - } |
|
| 59 | - catch (\Throwable $t) |
|
| 55 | + } catch (\Throwable $t) |
|
| 60 | 56 | { |
| 61 | 57 | throw new MnsException($statusCode, $t->getMessage()); |
| 62 | 58 | } |
@@ -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()); |
@@ -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()); |