Passed
Push — master ( 0d7bfe...0f2983 )
by Aimeos
02:40
created
client/jsonapi/templates/order/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
 }
25 25
 
26 26
 
27
-$entryFcn = function( \Aimeos\MShop\Order\Item\Iface $item, \Aimeos\MShop\Common\Helper\Form\Iface $form = null ) use ( $fields, $target, $cntl, $action, $config )
28
-{
27
+$entryFcn = function( \Aimeos\MShop\Order\Item\Iface $item, \Aimeos\MShop\Common\Helper\Form\Iface $form = null ) use ( $fields, $target, $cntl, $action, $config ) {
29 28
 	$id = $item->getId();
30 29
 	$attributes = $item->toArray();
31 30
 	$type = $item->getResourceType();
@@ -96,8 +95,7 @@  discard block
 block discarded – undo
96 95
 				foreach( $items as $item ) {
97 96
 					$data[] = $entryFcn( $item, $this->get( 'form' ) );
98 97
 				}
99
-			}
100
-			else
98
+			} else
101 99
 			{
102 100
 				$data = $entryFcn( $items, $this->get( 'form' ) );
103 101
 			}
Please login to merge, or discard this patch.
client/jsonapi/templates/locale/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
 }
30 30
 
31 31
 
32
-$entryFcn = function( \Aimeos\MShop\Locale\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
33
-{
32
+$entryFcn = function( \Aimeos\MShop\Locale\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
34 33
 	$id = $item->getId();
35 34
 	$attributes = $item->toArray();
36 35
 	$type = $item->getResourceType();
@@ -98,8 +97,7 @@  discard block
 block discarded – undo
98 97
 				foreach( $items as $localeItem ) {
99 98
 					$data[] = $entryFcn( $localeItem );
100 99
 				}
101
-			}
102
-			else
100
+			} else
103 101
 			{
104 102
 				$data = $entryFcn( $items );
105 103
 			}
Please login to merge, or discard this patch.
client/jsonapi/templates/customer/relationships/standard.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,15 +25,13 @@  discard block
 block discarded – undo
25 25
 }
26 26
 
27 27
 
28
-$removeFcn = function( $key, $array )
29
-{
28
+$removeFcn = function( $key, $array ) {
30 29
 	unset( $array[$key] );
31 30
 	return $array;
32 31
 };
33 32
 
34 33
 
35
-$entryFcn = function( \Aimeos\MShop\Common\Item\Lists\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
36
-{
34
+$entryFcn = function( \Aimeos\MShop\Common\Item\Lists\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
37 35
 	$relid = $item->getId();
38 36
 	$id = $item->getParentId();
39 37
 	$attributes = $item->toArray();
@@ -95,8 +93,7 @@  discard block
 block discarded – undo
95 93
 				foreach( $items as $item ) {
96 94
 					$data[] = $entryFcn( $item );
97 95
 				}
98
-			}
99
-			else
96
+			} else
100 97
 			{
101 98
 				$data = $entryFcn( $items );
102 99
 			}
Please login to merge, or discard this patch.
client/jsonapi/templates/customer/address/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
 }
26 26
 
27 27
 
28
-$entryFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
29
-{
28
+$entryFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
30 29
 	$id = $item->getId();
31 30
 	$attributes = $item->toArray();
32 31
 	$type = $item->getResourceType();
@@ -92,8 +91,7 @@  discard block
 block discarded – undo
92 91
 				foreach( $items as $addrItem ) {
93 92
 					$data[] = $entryFcn( $addrItem );
94 93
 				}
95
-			}
96
-			else
94
+			} else
97 95
 			{
98 96
 				$data = $entryFcn( $items );
99 97
 			}
Please login to merge, or discard this patch.
client/jsonapi/templates/customer/standard.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
 }
26 26
 
27 27
 
28
-$entryFcn = function( \Aimeos\MShop\Customer\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
29
-{
28
+$entryFcn = function( \Aimeos\MShop\Customer\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
30 29
 	$id = $item->getId();
31 30
 	$type = $item->getResourceType();
32 31
 	$params = array( 'resource' => $type, 'id' => $id );
@@ -86,8 +85,7 @@  discard block
 block discarded – undo
86 85
 };
87 86
 
88 87
 
89
-$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, $target, $cntl, $action, $config, &$refFcn )
90
-{
88
+$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, $target, $cntl, $action, $config, &$refFcn ) {
91 89
 	$id = $item->getId();
92 90
 	$type = $item->getResourceType();
93 91
 
@@ -152,8 +150,7 @@  discard block
 block discarded – undo
152 150
 };
153 151
 
154 152
 
155
-$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn )
156
-{
153
+$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) {
157 154
 	$map = [];
158 155
 
159 156
 	if( $item instanceof \Aimeos\MShop\Customer\Item\Iface )
@@ -184,8 +181,7 @@  discard block
 block discarded – undo
184 181
 };
185 182
 
186 183
 
187
-$flatFcn = function( array $map )
188
-{
184
+$flatFcn = function( array $map ) {
189 185
 	$result = [];
190 186
 
191 187
 	foreach( $map as $list )
Please login to merge, or discard this patch.
client/jsonapi/templates/basket/standard.php 1 patch
Braces   +15 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\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
30
-{
29
+$entryFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) {
31 30
 	$allow = array( 'GET' );
32 31
 	$attributes = $item->toArray();
33 32
 	$params = ['resource' => 'basket', 'id' => $basketId];
@@ -95,8 +94,7 @@  discard block
 block discarded – undo
95 94
 };
96 95
 
97 96
 
98
-$productFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
99
-{
97
+$productFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) {
100 98
 	$products = [];
101 99
 
102 100
 	foreach( $item->getProducts() as $position => $orderProduct )
@@ -137,8 +135,7 @@  discard block
 block discarded – undo
137 135
 };
138 136
 
139 137
 
140
-$serviceFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
141
-{
138
+$serviceFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) {
142 139
 	$services = [];
143 140
 
144 141
 	foreach( $item->getServices() as $type => $list )
@@ -171,8 +168,7 @@  discard block
 block discarded – undo
171 168
 };
172 169
 
173 170
 
174
-$addressFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
175
-{
171
+$addressFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) {
176 172
 	$list = [];
177 173
 
178 174
 	foreach( $item->getAddresses() as $type => $addresses )
@@ -201,8 +197,7 @@  discard block
 block discarded – undo
201 197
 };
202 198
 
203 199
 
204
-$couponFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
205
-{
200
+$couponFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) {
206 201
 	$coupons = [];
207 202
 
208 203
 	foreach( $item->getCoupons() as $code => $list )
@@ -230,10 +225,13 @@  discard block
 block discarded – undo
230 225
 $allowed = '["GET"]';
231 226
 if( isset( $this->item ) && $this->item->getId() === null )
232 227
 {
233
-	try {
228
+	try
229
+	{
234 230
 		$this->item->check();
235 231
 		$allowed = '["DELETE","GET","PATCH","POST"]';
236
-	} catch( \Aimeos\MShop\Exception $e ) {
232
+	}
233
+	catch( \Aimeos\MShop\Exception $e )
234
+	{
237 235
 		$allowed = '["DELETE","GET","PATCH"]';
238 236
 	}
239 237
 }
@@ -280,10 +278,13 @@  discard block
 block discarded – undo
280 278
 					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'basket', 'id' => $basketId, 'related' => 'coupon'], [], $config ); ?>",
281 279
 					"allow": ["POST"]
282 280
 				}
283
-			<?php else : ?>
281
+			<?php else {
282
+	: ?>
284 283
 				,
285 284
 				"order": {
286
-					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config ); ?>",
285
+					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config );
286
+}
287
+?>",
287 288
 					"allow": ["POST"]
288 289
 				}
289 290
 			<?php endif; ?>
Please login to merge, or discard this patch.
client/jsonapi/templates/subscription/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
 }
25 25
 
26 26
 
27
-$entryFcn = function( \Aimeos\MShop\Subscription\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
28
-{
27
+$entryFcn = function( \Aimeos\MShop\Subscription\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
29 28
 	$id = $item->getId();
30 29
 	$attributes = $item->toArray();
31 30
 	$type = $item->getResourceType();
@@ -85,8 +84,7 @@  discard block
 block discarded – undo
85 84
 				foreach( $items as $item ) {
86 85
 					$data[] = $entryFcn( $item );
87 86
 				}
88
-			}
89
-			else
87
+			} else
90 88
 			{
91 89
 				$data = $entryFcn( $items );
92 90
 			}
Please login to merge, or discard this patch.
client/jsonapi/templates/catalog/standard.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
 }
30 30
 
31 31
 
32
-$entryFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
33
-{
32
+$entryFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
34 33
 	if( $item->isAvailable() === false ) {
35 34
 		return [];
36 35
 	}
@@ -80,8 +79,7 @@  discard block
 block discarded – undo
80 79
 };
81 80
 
82 81
 
83
-$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, $target, $cntl, $action, $config, &$refFcn )
84
-{
82
+$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, $target, $cntl, $action, $config, &$refFcn ) {
85 83
 	$id = $item->getId();
86 84
 	$type = $item->getResourceType();
87 85
 
@@ -150,8 +148,7 @@  discard block
 block discarded – undo
150 148
 };
151 149
 
152 150
 
153
-$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn )
154
-{
151
+$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) {
155 152
 	$map = [];
156 153
 
157 154
 	if( $item instanceof \Aimeos\MShop\Catalog\Item\Iface )
@@ -185,8 +182,7 @@  discard block
 block discarded – undo
185 182
 };
186 183
 
187 184
 
188
-$flatFcn = function( array $map )
189
-{
185
+$flatFcn = function( array $map ) {
190 186
 	$result = [];
191 187
 
192 188
 	foreach( $map as $list )
Please login to merge, or discard this patch.