Completed
Push — master ( 22e795...d89dee )
by Aimeos
02:35
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/Address/Standard.php 1 patch
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -77,23 +77,20 @@  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\MShop\Exception $e )
86
+		} catch( \Aimeos\MShop\Exception $e )
89 87
 		{
90 88
 			$status = 404;
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( \Exception $e )
93
+		} catch( \Exception $e )
97 94
 		{
98 95
 			$status = 500;
99 96
 			$view->errors = array( array(
@@ -129,24 +126,21 @@  discard block
 block discarded – undo
129 126
 			}
130 127
 
131 128
 			$status = 200;
132
-		}
133
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
129
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
134 130
 		{
135 131
 			$status = 403;
136 132
 			$view->errors = array( array(
137 133
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
138 134
 				'detail' => $e->getTraceAsString(),
139 135
 			) );
140
-		}
141
-		catch( \Aimeos\MShop\Exception $e )
136
+		} catch( \Aimeos\MShop\Exception $e )
142 137
 		{
143 138
 			$status = 404;
144 139
 			$view->errors = array( array(
145 140
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
146 141
 				'detail' => $e->getTraceAsString(),
147 142
 			) );
148
-		}
149
-		catch( \Exception $e )
143
+		} catch( \Exception $e )
150 144
 		{
151 145
 			$status = 500;
152 146
 			$view->errors = array( array(
@@ -182,24 +176,21 @@  discard block
 block discarded – undo
182 176
 
183 177
 			$view->items = $cntl->editAddressItem( $view->param( 'relid' ), (array) $payload->data->attributes );
184 178
 			$status = 200;
185
-		}
186
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
179
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
187 180
 		{
188 181
 			$status = 403;
189 182
 			$view->errors = array( array(
190 183
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
191 184
 				'detail' => $e->getTraceAsString(),
192 185
 			) );
193
-		}
194
-		catch( \Aimeos\MShop\Exception $e )
186
+		} catch( \Aimeos\MShop\Exception $e )
195 187
 		{
196 188
 			$status = 404;
197 189
 			$view->errors = array( array(
198 190
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
199 191
 				'detail' => $e->getTraceAsString(),
200 192
 			) );
201
-		}
202
-		catch( \Exception $e )
193
+		} catch( \Exception $e )
203 194
 		{
204 195
 			$status = 500;
205 196
 			$view->errors = array( array(
@@ -249,16 +240,14 @@  discard block
 block discarded – undo
249 240
 
250 241
 			$view->items = $list;
251 242
 			$status = 201;
252
-		}
253
-		catch( \Aimeos\MShop\Exception $e )
243
+		} catch( \Aimeos\MShop\Exception $e )
254 244
 		{
255 245
 			$status = 404;
256 246
 			$view->errors = array( array(
257 247
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
258 248
 				'detail' => $e->getTraceAsString(),
259 249
 			) );
260
-		}
261
-		catch( \Exception $e )
250
+		} catch( \Exception $e )
262 251
 		{
263 252
 			$status = 500;
264 253
 			$view->errors = array( array(
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.