Completed
Push — master ( 9ec67f...760181 )
by Aimeos
02:25
created
client/jsonapi/templates/product/standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 $first = ( $offset > 0 ? 0 : null );
99 99
 $prev = ( $offset - $limit >= 0 ? $offset - $limit : null );
100 100
 $next = ( $offset + $limit < $total ? $offset + $limit : null );
101
-$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null );
101
+$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null );
102 102
 
103 103
 
104 104
 $map = $this->get( 'itemMap', array() );
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -231,8 +231,7 @@
 block discarded – undo
231 231
 					$data[] = $entryFcn( $productItem );
232 232
 					$included = array_merge( $included, $refFcn( $productItem, 0 ) );
233 233
 				}
234
-			}
235
-			else
234
+			} else
236 235
 			{
237 236
 				$data = $entryFcn( $items );
238 237
 				$included = $refFcn( $items, 0 );
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.
client/jsonapi/templates/customer/address/standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,7 @@
 block discarded – undo
91 91
 				foreach( $items as $addrItem ) {
92 92
 					$data[] = $entryFcn( $addrItem );
93 93
 				}
94
-			}
95
-			else
94
+			} else
96 95
 			{
97 96
 				$data = $entryFcn( $items );
98 97
 			}
Please login to merge, or discard this patch.