Passed
Push — master ( 3ac294...345fed )
by Aimeos
15:29 queued 06:31
created
templates/client/jsonapi/stock/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,8 +35,7 @@  discard block
 block discarded – undo
35 35
 }
36 36
 
37 37
 
38
-$entryFcn = function( \Aimeos\MShop\Stock\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
39
-{
38
+$entryFcn = function( \Aimeos\MShop\Stock\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
40 39
 	$id = $item->getId();
41 40
 	$type = $item->getResourceType();
42 41
 	$params = array( 'resource' => $type, 'id' => $id );
@@ -111,8 +110,7 @@  discard block
 block discarded – undo
111 110
 				foreach( $items as $item ) {
112 111
 					$data[] = $entryFcn( $item );
113 112
 				}
114
-			}
115
-			else
113
+			} else
116 114
 			{
117 115
 				$data = $entryFcn( $items );
118 116
 			}
Please login to merge, or discard this patch.
src/Base/View/Helper/Jincluded/Standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,7 @@
 block discarded – undo
39 39
 			foreach( $item as $entry ) {
40 40
 				$this->entry( $entry, $fields, $fcn );
41 41
 			}
42
-		}
43
-		else
42
+		} else
44 43
 		{
45 44
 			$this->entry( $item, $fields, $fcn );
46 45
 		}
Please login to merge, or discard this patch.
templates/client/jsonapi/order/standard.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
 }
27 27
 
28 28
 
29
-$entryFcn = function( \Aimeos\MShop\Order\Item\Iface $item, \Aimeos\MShop\Common\Helper\Form\Iface $form = null ) use ( $fields, $target, $cntl, $action, $config )
30
-{
29
+$entryFcn = function( \Aimeos\MShop\Order\Item\Iface $item, \Aimeos\MShop\Common\Helper\Form\Iface $form = null ) use ( $fields, $target, $cntl, $action, $config ) {
31 30
 	$relationships = [];
32 31
 	$id = $item->getId();
33 32
 	$attributes = $item->toArray();
@@ -92,8 +91,7 @@  discard block
 block discarded – undo
92 91
 };
93 92
 
94 93
 
95
-$productFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields )
96
-{
94
+$productFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields ) {
97 95
 	$result = [];
98 96
 
99 97
 	foreach( $item->getProducts() as $orderProduct )
@@ -133,8 +131,7 @@  discard block
 block discarded – undo
133 131
 };
134 132
 
135 133
 
136
-$serviceFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields )
137
-{
134
+$serviceFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields ) {
138 135
 	$result = [];
139 136
 
140 137
 	foreach( $item->getServices() as $type => $list )
@@ -166,8 +163,7 @@  discard block
 block discarded – undo
166 163
 };
167 164
 
168 165
 
169
-$addressFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields )
170
-{
166
+$addressFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields ) {
171 167
 	$list = [];
172 168
 
173 169
 	foreach( $item->getAddresses() as $type => $addresses )
@@ -189,8 +185,7 @@  discard block
 block discarded – undo
189 185
 };
190 186
 
191 187
 
192
-$couponFcn = function( \Aimeos\MShop\Order\Item\Iface $item )
193
-{
188
+$couponFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) {
194 189
 	$coupons = [];
195 190
 
196 191
 	foreach( $item->getCoupons() as $code => $list ) {
@@ -201,8 +196,7 @@  discard block
 block discarded – undo
201 196
 };
202 197
 
203 198
 
204
-$customerFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
205
-{
199
+$customerFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
206 200
 	$result = [];
207 201
 
208 202
 	if( ( $customer = $item->getCustomerItem() ) !== null && $customer->isAvailable() )
@@ -266,8 +260,7 @@  discard block
 block discarded – undo
266 260
 					$included = array_replace_recursive( $included, $serviceFcn( $item ) );
267 261
 					$included = array_replace_recursive( $included, $customerFcn( $item ) );
268 262
 				}
269
-			}
270
-			else
263
+			} else
271 264
 			{
272 265
 				$data = $entryFcn( $items, $this->get( 'form' ) );
273 266
 				$included = array_replace_recursive( $included, $couponFcn( $items ) );
Please login to merge, or discard this patch.
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.