Passed
Push — master ( 0d6143...97bb42 )
by Aimeos
02:30
created
templates/client/jsonapi/basket/standard.php 1 patch
Braces   +11 added lines, -14 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
 }
29 29
 
30 30
 
31
-$entryFcn = function( \Aimeos\MShop\Order\Item\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
32
-{
31
+$entryFcn = function( \Aimeos\MShop\Order\Item\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) {
33 32
 	$allow = array( 'GET' );
34 33
 	$attributes = $item->toArray();
35 34
 	$params = ['resource' => 'basket', 'id' => $basketId];
@@ -101,8 +100,7 @@  discard block
 block discarded – undo
101 100
 };
102 101
 
103 102
 
104
-$productFcn = function( \Aimeos\MShop\Order\Item\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
105
-{
103
+$productFcn = function( \Aimeos\MShop\Order\Item\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) {
106 104
 	$result = [];
107 105
 
108 106
 	foreach( $item->getProducts() as $position => $orderProduct )
@@ -153,8 +151,7 @@  discard block
 block discarded – undo
153 151
 };
154 152
 
155 153
 
156
-$serviceFcn = function( \Aimeos\MShop\Order\Item\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
157
-{
154
+$serviceFcn = function( \Aimeos\MShop\Order\Item\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) {
158 155
 	$result = [];
159 156
 
160 157
 	foreach( $item->getServices() as $type => $list )
@@ -197,8 +194,7 @@  discard block
 block discarded – undo
197 194
 };
198 195
 
199 196
 
200
-$addressFcn = function( \Aimeos\MShop\Order\Item\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
201
-{
197
+$addressFcn = function( \Aimeos\MShop\Order\Item\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) {
202 198
 	$list = [];
203 199
 
204 200
 	foreach( $item->getAddresses() as $type => $addresses )
@@ -231,8 +227,7 @@  discard block
 block discarded – undo
231 227
 };
232 228
 
233 229
 
234
-$couponFcn = function( \Aimeos\MShop\Order\Item\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
235
-{
230
+$couponFcn = function( \Aimeos\MShop\Order\Item\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) {
236 231
 	$coupons = [];
237 232
 
238 233
 	foreach( $item->getCoupons() as $code => $list )
@@ -257,8 +252,7 @@  discard block
 block discarded – undo
257 252
 };
258 253
 
259 254
 
260
-$customerFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
261
-{
255
+$customerFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
262 256
 	$result = [];
263 257
 	$customer = $this->item->getCustomerItem();
264 258
 
@@ -326,10 +320,13 @@  discard block
 block discarded – undo
326 320
 					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'basket', 'id' => $basketId, 'related' => 'coupon'], [], $config ); ?>",
327 321
 					"allow": ["DELETE", "POST"]
328 322
 				}
329
-			<?php else : ?>
323
+			<?php else {
324
+	: ?>
330 325
 				,
331 326
 				"order": {
332
-					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config ); ?>",
327
+					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config );
328
+}
329
+?>",
333 330
 					"allow": ["POST"]
334 331
 				}
335 332
 			<?php endif; ?>
Please login to merge, or discard this patch.
templates/client/jsonapi/customer/review/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
 }
28 28
 
29 29
 
30
-$entryFcn = function( \Aimeos\MShop\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
31
-{
30
+$entryFcn = function( \Aimeos\MShop\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
32 31
 	$relid = $item->getId();
33 32
 	$attributes = $item->toArray();
34 33
 	$id = $this->get( 'customerid' );
@@ -86,8 +85,7 @@  discard block
 block discarded – undo
86 85
 				foreach( $items as $item ) {
87 86
 					$data[] = $entryFcn( $item );
88 87
 				}
89
-			}
90
-			else
88
+			} else
91 89
 			{
92 90
 				$data = $entryFcn( $items );
93 91
 			}
Please login to merge, or discard this patch.
templates/client/jsonapi/customer/address/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
 }
28 28
 
29 29
 
30
-$entryFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
31
-{
30
+$entryFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
32 31
 	$id = $item->getId();
33 32
 	$attributes = $item->toArray();
34 33
 	$rtype = str_replace( '/', '.', $item->getResourceType() );
@@ -90,8 +89,7 @@  discard block
 block discarded – undo
90 89
 				foreach( $items as $addrItem ) {
91 90
 					$data[] = $entryFcn( $addrItem );
92 91
 				}
93
-			}
94
-			else
92
+			} else
95 93
 			{
96 94
 				$data = $entryFcn( $items );
97 95
 			}
Please login to merge, or discard this patch.
templates/client/jsonapi/customer/property/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
 }
28 28
 
29 29
 
30
-$entryFcn = function( \Aimeos\MShop\Common\Item\Property\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
31
-{
30
+$entryFcn = function( \Aimeos\MShop\Common\Item\Property\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
32 31
 	$id = $item->getId();
33 32
 	$attributes = $item->toArray();
34 33
 	$rtype = str_replace( '/', '.', $item->getResourceType() );
@@ -85,8 +84,7 @@  discard block
 block discarded – undo
85 84
 				foreach( $items as $propItem ) {
86 85
 					$data[] = $entryFcn( $propItem );
87 86
 				}
88
-			}
89
-			else
87
+			} else
90 88
 			{
91 89
 				$data = $entryFcn( $items );
92 90
 			}
Please login to merge, or discard this patch.