Completed
Push — master ( 61c665...5e15bb )
by Aimeos
02:18
created
client/jsonapi/src/Client/JsonApi/Basket/Address/Standard.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,8 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 					$this->controller->setAddress( $entry->id, null );
80 80
 				}
81
-			}
82
-			else
81
+			} else
83 82
 			{
84 83
 				$this->controller->setAddress( $relId, null );
85 84
 			}
@@ -87,16 +86,14 @@  discard block
 block discarded – undo
87 86
 
88 87
 			$view->item = $this->controller->get();
89 88
 			$status = 200;
90
-		}
91
-		catch( \Aimeos\MShop\Exception $e )
89
+		} catch( \Aimeos\MShop\Exception $e )
92 90
 		{
93 91
 			$status = 404;
94 92
 			$view->errors = array( array(
95 93
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
96 94
 				'detail' => $e->getTraceAsString(),
97 95
 			) );
98
-		}
99
-		catch( \Exception $e )
96
+		} catch( \Exception $e )
100 97
 		{
101 98
 			$status = 500;
102 99
 			$view->errors = array( array(
@@ -145,16 +142,14 @@  discard block
 block discarded – undo
145 142
 
146 143
 			$view->item = $this->controller->get();
147 144
 			$status = 201;
148
-		}
149
-		catch( \Aimeos\MShop\Exception $e )
145
+		} catch( \Aimeos\MShop\Exception $e )
150 146
 		{
151 147
 			$status = 404;
152 148
 			$view->errors = array( array(
153 149
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
154 150
 				'detail' => $e->getTraceAsString(),
155 151
 			) );
156
-		}
157
-		catch( \Exception $e )
152
+		} catch( \Exception $e )
158 153
 		{
159 154
 			$status = 500;
160 155
 			$view->errors = array( array(
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Basket/Product/Standard.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -78,8 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 					$this->controller->deleteProduct( $entry->id );
80 80
 				}
81
-			}
82
-			else
81
+			} else
83 82
 			{
84 83
 				$this->controller->deleteProduct( $relId );
85 84
 			}
@@ -87,16 +86,14 @@  discard block
 block discarded – undo
87 86
 
88 87
 			$view->item = $this->controller->get();
89 88
 			$status = 200;
90
-		}
91
-		catch( \Aimeos\MShop\Exception $e )
89
+		} catch( \Aimeos\MShop\Exception $e )
92 90
 		{
93 91
 			$status = 404;
94 92
 			$view->errors = array( array(
95 93
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
96 94
 				'detail' => $e->getTraceAsString(),
97 95
 			) );
98
-		}
99
-		catch( \Exception $e )
96
+		} catch( \Exception $e )
100 97
 		{
101 98
 			$status = 500;
102 99
 			$view->errors = array( array(
@@ -152,16 +149,14 @@  discard block
 block discarded – undo
152 149
 
153 150
 			$view->item = $this->controller->get();
154 151
 			$status = 200;
155
-		}
156
-		catch( \Aimeos\MShop\Exception $e )
152
+		} catch( \Aimeos\MShop\Exception $e )
157 153
 		{
158 154
 			$status = 404;
159 155
 			$view->errors = array( array(
160 156
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
161 157
 				'detail' => $e->getTraceAsString(),
162 158
 			) );
163
-		}
164
-		catch( \Exception $e )
159
+		} catch( \Exception $e )
165 160
 		{
166 161
 			$status = 500;
167 162
 			$view->errors = array( array(
@@ -218,16 +213,14 @@  discard block
 block discarded – undo
218 213
 
219 214
 			$view->item = $this->controller->get();
220 215
 			$status = 201;
221
-		}
222
-		catch( \Aimeos\MShop\Exception $e )
216
+		} catch( \Aimeos\MShop\Exception $e )
223 217
 		{
224 218
 			$status = 404;
225 219
 			$view->errors = array( array(
226 220
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
227 221
 				'detail' => $e->getTraceAsString(),
228 222
 			) );
229
-		}
230
-		catch( \Exception $e )
223
+		} catch( \Exception $e )
231 224
 		{
232 225
 			$status = 500;
233 226
 			$view->errors = array( array(
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Basket/Service/Standard.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,8 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 					$this->controller->setService( $entry->id, null );
80 80
 				}
81
-			}
82
-			else
81
+			} else
83 82
 			{
84 83
 				$this->controller->setService( $relId, null );
85 84
 			}
@@ -87,16 +86,14 @@  discard block
 block discarded – undo
87 86
 
88 87
 			$view->item = $this->controller->get();
89 88
 			$status = 200;
90
-		}
91
-		catch( \Aimeos\MShop\Exception $e )
89
+		} catch( \Aimeos\MShop\Exception $e )
92 90
 		{
93 91
 			$status = 404;
94 92
 			$view->errors = array( array(
95 93
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
96 94
 				'detail' => $e->getTraceAsString(),
97 95
 			) );
98
-		}
99
-		catch( \Exception $e )
96
+		} catch( \Exception $e )
100 97
 		{
101 98
 			$status = 500;
102 99
 			$view->errors = array( array(
@@ -156,16 +153,14 @@  discard block
 block discarded – undo
156 153
 
157 154
 			$view->item = $this->controller->get();
158 155
 			$status = 201;
159
-		}
160
-		catch( \Aimeos\MShop\Exception $e )
156
+		} catch( \Aimeos\MShop\Exception $e )
161 157
 		{
162 158
 			$status = 404;
163 159
 			$view->errors = array( array(
164 160
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
165 161
 				'detail' => $e->getTraceAsString(),
166 162
 			) );
167
-		}
168
-		catch( \Exception $e )
163
+		} catch( \Exception $e )
169 164
 		{
170 165
 			$status = 500;
171 166
 			$view->errors = array( array(
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Basket/Coupon/Standard.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,8 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 					$this->controller->deleteCoupon( $entry->id );
80 80
 				}
81
-			}
82
-			else
81
+			} else
83 82
 			{
84 83
 				$this->controller->deleteCoupon( $relId );
85 84
 			}
@@ -87,16 +86,14 @@  discard block
 block discarded – undo
87 86
 
88 87
 			$view->item = $this->controller->get();
89 88
 			$status = 200;
90
-		}
91
-		catch( \Aimeos\MShop\Exception $e )
89
+		} catch( \Aimeos\MShop\Exception $e )
92 90
 		{
93 91
 			$status = 404;
94 92
 			$view->errors = array( array(
95 93
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
96 94
 				'detail' => $e->getTraceAsString(),
97 95
 			) );
98
-		}
99
-		catch( \Exception $e )
96
+		} catch( \Exception $e )
100 97
 		{
101 98
 			$status = 500;
102 99
 			$view->errors = array( array(
@@ -145,16 +142,14 @@  discard block
 block discarded – undo
145 142
 
146 143
 			$view->item = $this->controller->get();
147 144
 			$status = 201;
148
-		}
149
-		catch( \Aimeos\MShop\Exception $e )
145
+		} catch( \Aimeos\MShop\Exception $e )
150 146
 		{
151 147
 			$status = 404;
152 148
 			$view->errors = array( array(
153 149
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
154 150
 				'detail' => $e->getTraceAsString(),
155 151
 			) );
156
-		}
157
-		catch( \Exception $e )
152
+		} catch( \Exception $e )
158 153
 		{
159 154
 			$status = 500;
160 155
 			$view->errors = array( array(
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Product/Standard.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,16 +46,14 @@  discard block
 block discarded – undo
46 46
 			}
47 47
 
48 48
 			$status = 200;
49
-		}
50
-		catch( \Aimeos\MShop\Exception $e )
49
+		} catch( \Aimeos\MShop\Exception $e )
51 50
 		{
52 51
 			$status = 404;
53 52
 			$view->errors = array( array(
54 53
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
55 54
 				'detail' => $e->getTraceAsString(),
56 55
 			) );
57
-		}
58
-		catch( \Exception $e )
56
+		} catch( \Exception $e )
59 57
 		{
60 58
 			$status = 500;
61 59
 			$view->errors = array( array(
@@ -87,8 +85,7 @@  discard block
 block discarded – undo
87 85
 			 */
88 86
 			$tplconf = 'client/jsonapi/product/standard/template-aggregate';
89 87
 			$default = 'aggregate-standard.php';
90
-		}
91
-		else
88
+		} else
92 89
 		{
93 90
 			/** client/jsonapi/product/standard/template
94 91
 			 * Relative path to the product JSON API template
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -287,7 +287,7 @@
 block discarded – undo
287 287
 	{
288 288
 		$total = 0;
289 289
 		$map = [];
290
-		$direction  = '+';
290
+		$direction = '+';
291 291
 
292 292
 		$ref = $view->param( 'include', [] );
293 293
 		$size = $view->param( 'page/limit', 48 );
Please login to merge, or discard this patch.
client/jsonapi/templates/aggregate-standard.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,12 @@
 block discarded – undo
20 20
 
21 21
 		"errors": <?php echo json_encode( $this->errors, JSON_PRETTY_PRINT ); ?>
22 22
 
23
-	<?php else : ?>
23
+	<?php else {
24
+	: ?>
24 25
 
25
-		"data": <?php echo json_encode( $entries ); ?>
26
+		"data": <?php echo json_encode( $entries );
27
+}
28
+?>
26 29
 
27 30
 	<?php endif; ?>
28 31
 }
Please login to merge, or discard this patch.
client/jsonapi/templates/locale/standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@
 block discarded – undo
83 83
 				foreach( $items as $localeItem ) {
84 84
 					$data[] = $entryFcn( $localeItem );
85 85
 				}
86
-			}
87
-			else
86
+			} else
88 87
 			{
89 88
 				$data = $entryFcn( $items );
90 89
 			}
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Customer/Standard.php 1 patch
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -40,24 +40,21 @@  discard block
 block discarded – undo
40 40
 			$cntl = \Aimeos\Controller\Frontend\Factory::createController( $this->getContext(), 'customer' );
41 41
 			$cntl->deleteItem( $view->param( 'id' ) );
42 42
 			$status = 200;
43
-		}
44
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
43
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
45 44
 		{
46 45
 			$status = 403;
47 46
 			$view->errors = array( array(
48 47
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
49 48
 				'detail' => $e->getTraceAsString(),
50 49
 			) );
51
-		}
52
-		catch( \Aimeos\MShop\Exception $e )
50
+		} catch( \Aimeos\MShop\Exception $e )
53 51
 		{
54 52
 			$status = 404;
55 53
 			$view->errors = array( array(
56 54
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
57 55
 				'detail' => $e->getTraceAsString(),
58 56
 			) );
59
-		}
60
-		catch( \Exception $e )
57
+		} catch( \Exception $e )
61 58
 		{
62 59
 			$status = 500;
63 60
 			$view->errors = array( array(
@@ -93,24 +90,21 @@  discard block
 block discarded – undo
93 90
 
94 91
 			$view->item = $cntl->getItem( $view->param( 'id' ), $ref );
95 92
 			$status = 200;
96
-		}
97
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
93
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
98 94
 		{
99 95
 			$status = 403;
100 96
 			$view->errors = array( array(
101 97
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
102 98
 				'detail' => $e->getTraceAsString(),
103 99
 			) );
104
-		}
105
-		catch( \Aimeos\MShop\Exception $e )
100
+		} catch( \Aimeos\MShop\Exception $e )
106 101
 		{
107 102
 			$status = 404;
108 103
 			$view->errors = array( array(
109 104
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
110 105
 				'detail' => $e->getTraceAsString(),
111 106
 			) );
112
-		}
113
-		catch( \Exception $e )
107
+		} catch( \Exception $e )
114 108
 		{
115 109
 			$status = 500;
116 110
 			$view->errors = array( array(
@@ -146,24 +140,21 @@  discard block
 block discarded – undo
146 140
 
147 141
 			$view->item = $cntl->editItem( $view->param( 'id' ), (array) $payload->data->attributes );
148 142
 			$status = 200;
149
-		}
150
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
143
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
151 144
 		{
152 145
 			$status = 403;
153 146
 			$view->errors = array( array(
154 147
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
155 148
 				'detail' => $e->getTraceAsString(),
156 149
 			) );
157
-		}
158
-		catch( \Aimeos\MShop\Exception $e )
150
+		} catch( \Aimeos\MShop\Exception $e )
159 151
 		{
160 152
 			$status = 404;
161 153
 			$view->errors = array( array(
162 154
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
163 155
 				'detail' => $e->getTraceAsString(),
164 156
 			) );
165
-		}
166
-		catch( \Exception $e )
157
+		} catch( \Exception $e )
167 158
 		{
168 159
 			$status = 500;
169 160
 			$view->errors = array( array(
@@ -199,24 +190,21 @@  discard block
 block discarded – undo
199 190
 
200 191
 			$view->item = $cntl->addItem( (array) $payload->data->attributes );
201 192
 			$status = 201;
202
-		}
203
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
193
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
204 194
 		{
205 195
 			$status = 403;
206 196
 			$view->errors = array( array(
207 197
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
208 198
 				'detail' => $e->getTraceAsString(),
209 199
 			) );
210
-		}
211
-		catch( \Aimeos\MShop\Exception $e )
200
+		} catch( \Aimeos\MShop\Exception $e )
212 201
 		{
213 202
 			$status = 404;
214 203
 			$view->errors = array( array(
215 204
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
216 205
 				'detail' => $e->getTraceAsString(),
217 206
 			) );
218
-		}
219
-		catch( \Exception $e )
207
+		} catch( \Exception $e )
220 208
 		{
221 209
 			$status = 500;
222 210
 			$view->errors = array( array(
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Customer/Address/Standard.php 1 patch
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -77,31 +77,27 @@  discard block
 block discarded – undo
77 77
 
78 78
 					$this->controller->deleteAddressItem( $entry->id );
79 79
 				}
80
-			}
81
-			else
80
+			} else
82 81
 			{
83 82
 				$this->controller->deleteAddressItem( $relId );
84 83
 			}
85 84
 
86 85
 			$status = 200;
87
-		}
88
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
86
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
89 87
 		{
90 88
 			$status = 403;
91 89
 			$view->errors = array( array(
92 90
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
93 91
 				'detail' => $e->getTraceAsString(),
94 92
 			) );
95
-		}
96
-		catch( \Aimeos\MShop\Exception $e )
93
+		} catch( \Aimeos\MShop\Exception $e )
97 94
 		{
98 95
 			$status = 404;
99 96
 			$view->errors = array( array(
100 97
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
101 98
 				'detail' => $e->getTraceAsString(),
102 99
 			) );
103
-		}
104
-		catch( \Exception $e )
100
+		} catch( \Exception $e )
105 101
 		{
106 102
 			$status = 500;
107 103
 			$view->errors = array( array(
@@ -138,24 +134,21 @@  discard block
 block discarded – undo
138 134
 
139 135
 			$view->total = count( $view->items );
140 136
 			$status = 200;
141
-		}
142
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
137
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
143 138
 		{
144 139
 			$status = 403;
145 140
 			$view->errors = array( array(
146 141
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
147 142
 				'detail' => $e->getTraceAsString(),
148 143
 			) );
149
-		}
150
-		catch( \Aimeos\MShop\Exception $e )
144
+		} catch( \Aimeos\MShop\Exception $e )
151 145
 		{
152 146
 			$status = 404;
153 147
 			$view->errors = array( array(
154 148
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
155 149
 				'detail' => $e->getTraceAsString(),
156 150
 			) );
157
-		}
158
-		catch( \Exception $e )
151
+		} catch( \Exception $e )
159 152
 		{
160 153
 			$status = 500;
161 154
 			$view->errors = array( array(
@@ -192,24 +185,21 @@  discard block
 block discarded – undo
192 185
 			$view->items = $cntl->editAddressItem( $view->param( 'relatedid' ), (array) $payload->data->attributes );
193 186
 			$view->total = 1;
194 187
 			$status = 200;
195
-		}
196
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
188
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
197 189
 		{
198 190
 			$status = 403;
199 191
 			$view->errors = array( array(
200 192
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
201 193
 				'detail' => $e->getTraceAsString(),
202 194
 			) );
203
-		}
204
-		catch( \Aimeos\MShop\Exception $e )
195
+		} catch( \Aimeos\MShop\Exception $e )
205 196
 		{
206 197
 			$status = 404;
207 198
 			$view->errors = array( array(
208 199
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
209 200
 				'detail' => $e->getTraceAsString(),
210 201
 			) );
211
-		}
212
-		catch( \Exception $e )
202
+		} catch( \Exception $e )
213 203
 		{
214 204
 			$status = 500;
215 205
 			$view->errors = array( array(
@@ -260,24 +250,21 @@  discard block
 block discarded – undo
260 250
 			$view->total = count( $list );
261 251
 			$view->items = $list;
262 252
 			$status = 201;
263
-		}
264
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
253
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
265 254
 		{
266 255
 			$status = 403;
267 256
 			$view->errors = array( array(
268 257
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
269 258
 				'detail' => $e->getTraceAsString(),
270 259
 			) );
271
-		}
272
-		catch( \Aimeos\MShop\Exception $e )
260
+		} catch( \Aimeos\MShop\Exception $e )
273 261
 		{
274 262
 			$status = 404;
275 263
 			$view->errors = array( array(
276 264
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
277 265
 				'detail' => $e->getTraceAsString(),
278 266
 			) );
279
-		}
280
-		catch( \Exception $e )
267
+		} catch( \Exception $e )
281 268
 		{
282 269
 			$status = 500;
283 270
 			$view->errors = array( array(
Please login to merge, or discard this patch.