@@ -85,6 +85,9 @@ discard block |
||
| 85 | 85 | return $query; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | + /** |
|
| 89 | + * @param DynamoDbException $ex |
|
| 90 | + */ |
|
| 88 | 91 | protected function throwAwsPostError($ex) |
| 89 | 92 | { |
| 90 | 93 | switch ($ex->getAwsErrorCode()) { |
@@ -122,6 +125,9 @@ discard block |
||
| 122 | 125 | return $query; |
| 123 | 126 | } |
| 124 | 127 | |
| 128 | + /** |
|
| 129 | + * @param DynamoDbException $ex |
|
| 130 | + */ |
|
| 125 | 131 | protected function throwAwsPutError($ex) |
| 126 | 132 | { |
| 127 | 133 | switch ($ex->getAwsErrorCode()) { |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } catch (DynamoDbException $ex) { |
| 146 | 146 | $this->throwAwsPutError($ex); |
| 147 | 147 | } catch (\Exception $ex) { |
| 148 | - throw new RestException($ex->getMessage(), ['result'=>empty($res)?null:$res]); |
|
| 148 | + throw new RestException($ex->getMessage(), ['result'=>empty($res) ? null : $res]); |
|
| 149 | 149 | } |
| 150 | 150 | } |
| 151 | 151 | |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | $res = $this->client->deleteItem($query); |
| 168 | 168 | return $resourceId; |
| 169 | 169 | } catch (\Exception $ex) { |
| 170 | - throw new RestException($ex->getMessage(), ['result'=>empty($res)?null:$res]); |
|
| 170 | + throw new RestException($ex->getMessage(), ['result'=>empty($res) ? null : $res]); |
|
| 171 | 171 | } |
| 172 | 172 | } |
| 173 | 173 | |