Completed
Push — master ( 7da046...265fe5 )
by Aimeos
02:41
created
admin/jsonadm/templates/partials/order/base/data-standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,12 +52,10 @@
 block discarded – undo
52 52
 	foreach( $data as $item ) {
53 53
 		$response[] = $build( $item, $fields, $childItems );
54 54
 	}
55
-}
56
-elseif( $data !== null )
55
+} elseif( $data !== null )
57 56
 {
58 57
 	$response = $build( $data, $fields, $childItems );
59
-}
60
-else
58
+} else
61 59
 {
62 60
 	$response = null;
63 61
 }
Please login to merge, or discard this patch.
admin/jsonadm/templates/partials/data-standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,12 +52,10 @@
 block discarded – undo
52 52
 	foreach( $data as $item ) {
53 53
 		$response[] = $build( $item, $fields, $childItems );
54 54
 	}
55
-}
56
-elseif( $data !== null )
55
+} elseif( $data !== null )
57 56
 {
58 57
 	$response = $build( $data, $fields, $childItems );
59
-}
60
-else
58
+} else
61 59
 {
62 60
 	$response = null;
63 61
 }
Please login to merge, or discard this patch.
admin/jsonadm/templates/partials/order/data-standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,12 +52,10 @@
 block discarded – undo
52 52
 	foreach( $data as $item ) {
53 53
 		$response[] = $build( $item, $fields, $childItems );
54 54
 	}
55
-}
56
-elseif( $data !== null )
55
+} elseif( $data !== null )
57 56
 {
58 57
 	$response = $build( $data, $fields, $childItems );
59
-}
60
-else
58
+} else
61 59
 {
62 60
 	$response = null;
63 61
 }
Please login to merge, or discard this patch.
admin/jsonadm/src/Admin/JsonAdm/Factory.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,8 +136,7 @@
 block discarded – undo
136 136
 			if( ( $client = @call_user_func_array( array( $factory, 'createClient' ), $args ) ) === false ) {
137 137
 				throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Invalid factory "%1$s"', $factory ), 400 );
138 138
 			}
139
-		}
140
-		else
139
+		} else
141 140
 		{
142 141
 			$client = self::createClientRoot( $context, $view, $templatePaths, $path, $name );
143 142
 		}
Please login to merge, or discard this patch.
admin/jsonadm/src/Admin/JsonAdm/Base.php 1 patch
Braces   +17 added lines, -34 removed lines patch added patch discarded remove patch
@@ -60,24 +60,21 @@  discard block
 block discarded – undo
60 60
 		{
61 61
 			$view = $this->deleteItems( $view, $body );
62 62
 			$status = 200;
63
-		}
64
-		catch( \Aimeos\Admin\JsonAdm\Exception $e )
63
+		} catch( \Aimeos\Admin\JsonAdm\Exception $e )
65 64
 		{
66 65
 			$status = $e->getCode();
67 66
 			$view->errors = array( array(
68 67
 				'title' => $context->getI18n()->dt( 'admin/jsonadm', $e->getMessage() ),
69 68
 				'detail' => $e->getTraceAsString(),
70 69
 			) );
71
-		}
72
-		catch( \Aimeos\MShop\Exception $e )
70
+		} catch( \Aimeos\MShop\Exception $e )
73 71
 		{
74 72
 			$status = 404;
75 73
 			$view->errors = array( array(
76 74
 				'title' => $context->getI18n()->dt( 'mshop', $e->getMessage() ),
77 75
 				'detail' => $e->getTraceAsString(),
78 76
 			) );
79
-		}
80
-		catch( \Exception $e )
77
+		} catch( \Exception $e )
81 78
 		{
82 79
 			$status = 500;
83 80
 			$view->errors = array( array(
@@ -134,16 +131,14 @@  discard block
 block discarded – undo
134 131
 		{
135 132
 			$view = $this->getItem( $view );
136 133
 			$status = 200;
137
-		}
138
-		catch( \Aimeos\MShop\Exception $e )
134
+		} catch( \Aimeos\MShop\Exception $e )
139 135
 		{
140 136
 			$status = 404;
141 137
 			$view->errors = array( array(
142 138
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
143 139
 				'detail' => $e->getTraceAsString(),
144 140
 			) );
145
-		}
146
-		catch( \Exception $e )
141
+		} catch( \Exception $e )
147 142
 		{
148 143
 			$status = 500;
149 144
 			$view->errors = array( array(
@@ -201,24 +196,21 @@  discard block
 block discarded – undo
201 196
 		{
202 197
 			$view = $this->patchItems( $view, $body, $header );
203 198
 			$status = 200;
204
-		}
205
-		catch( \Aimeos\Admin\JsonAdm\Exception $e )
199
+		} catch( \Aimeos\Admin\JsonAdm\Exception $e )
206 200
 		{
207 201
 			$status = $e->getCode();
208 202
 			$view->errors = array( array(
209 203
 				'title' => $context->getI18n()->dt( 'admin/jsonadm', $e->getMessage() ),
210 204
 				'detail' => $e->getTraceAsString(),
211 205
 			) );
212
-		}
213
-		catch( \Aimeos\MShop\Exception $e )
206
+		} catch( \Aimeos\MShop\Exception $e )
214 207
 		{
215 208
 			$status = 404;
216 209
 			$view->errors = array( array(
217 210
 				'title' => $context->getI18n()->dt( 'mshop', $e->getMessage() ),
218 211
 				'detail' => $e->getTraceAsString(),
219 212
 			) );
220
-		}
221
-		catch( \Exception $e )
213
+		} catch( \Exception $e )
222 214
 		{
223 215
 			$status = 500;
224 216
 			$view->errors = array( array(
@@ -276,24 +268,21 @@  discard block
 block discarded – undo
276 268
 		{
277 269
 			$view = $this->postItems( $view, $body, $header );
278 270
 			$status = 201;
279
-		}
280
-		catch( \Aimeos\Admin\JsonAdm\Exception $e )
271
+		} catch( \Aimeos\Admin\JsonAdm\Exception $e )
281 272
 		{
282 273
 			$status = $e->getCode();
283 274
 			$view->errors = array( array(
284 275
 				'title' => $context->getI18n()->dt( 'admin/jsonadm', $e->getMessage() ),
285 276
 				'detail' => $e->getTraceAsString(),
286 277
 			) );
287
-		}
288
-		catch( \Aimeos\MShop\Exception $e )
278
+		} catch( \Aimeos\MShop\Exception $e )
289 279
 		{
290 280
 			$status = 404;
291 281
 			$view->errors = array( array(
292 282
 				'title' => $context->getI18n()->dt( 'mshop', $e->getMessage() ),
293 283
 				'detail' => $e->getTraceAsString(),
294 284
 			) );
295
-		}
296
-		catch( \Exception $e )
285
+		} catch( \Exception $e )
297 286
 		{
298 287
 			$status = 500;
299 288
 			$view->errors = array( array(
@@ -416,16 +405,14 @@  discard block
 block discarded – undo
416 405
 				'Allow' => 'DELETE,GET,POST,OPTIONS'
417 406
 			);
418 407
 			$status = 200;
419
-		}
420
-		catch( \Aimeos\MShop\Exception $e )
408
+		} catch( \Aimeos\MShop\Exception $e )
421 409
 		{
422 410
 			$status = 404;
423 411
 			$view->errors = array( array(
424 412
 				'title' => $context->getI18n()->dt( 'mshop', $e->getMessage() ),
425 413
 				'detail' => $e->getTraceAsString(),
426 414
 			) );
427
-		}
428
-		catch( \Exception $e )
415
+		} catch( \Exception $e )
429 416
 		{
430 417
 			$status = 500;
431 418
 			$view->errors = array( array(
@@ -486,8 +473,7 @@  discard block
 block discarded – undo
486 473
 			$ids = $this->getIds( $request );
487 474
 			$manager->deleteItems( $ids );
488 475
 			$view->total = count( $ids );
489
-		}
490
-		else
476
+		} else
491 477
 		{
492 478
 			$manager->deleteItem( $id );
493 479
 			$view->total = 1;
@@ -515,8 +501,7 @@  discard block
 block discarded – undo
515 501
 			$view->data = $manager->searchItems( $search, array(), $total );
516 502
 			$view->childItems = $this->getChildItems( $view->data, $include );
517 503
 			$view->listItems = $this->getListItems( $view->data, $include );
518
-		}
519
-		else
504
+		} else
520 505
 		{
521 506
 			$view->data = $manager->getItem( $id, array() );
522 507
 			$view->childItems = $this->getChildItems( array( $id => $view->data ), $include );
@@ -791,8 +776,7 @@  discard block
 block discarded – undo
791 776
 			$view->data = $data;
792 777
 			$view->total = count( $data );
793 778
 			$header['Content-Type'] = 'application/vnd.api+json; ext="bulk"; supported-ext="bulk"';
794
-		}
795
-		else
779
+		} else
796 780
 		{
797 781
 			if( ( $id = $view->param( 'id' ) ) == null ) {
798 782
 				throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'No ID given' ), 400 );
@@ -837,8 +821,7 @@  discard block
 block discarded – undo
837 821
 			$view->data = $data;
838 822
 			$view->total = count( $data );
839 823
 			$header['Content-Type'] = 'application/vnd.api+json; ext="bulk"; supported-ext="bulk"';
840
-		}
841
-		else
824
+		} else
842 825
 		{
843 826
 			$request->data->id = null;
844 827
 			$data = $this->saveEntry( $manager, $request->data );
Please login to merge, or discard this patch.