Passed
Pull Request — master (#8)
by
unknown
03:13
created
client/jsonapi/src/Client/JsonApi/Customer/Property/Standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
63 63
 				}
64 64
 
65 65
 				$cntl->store();
66
-			}
67
-			else
66
+			} else
68 67
 			{
69 68
 				if( ( $item = $items->get( $relId ) ) !== null ) {
70 69
 					$cntl->deletePropertyItem( $item )->store();
@@ -113,8 +112,7 @@  discard block
 block discarded – undo
113 112
 			{
114 113
 				$view->items = $items;
115 114
 				$view->total = count( $items );
116
-			}
117
-			else
115
+			} else
118 116
 			{
119 117
 				$view->items = $items->get( $relId );
120 118
 				$view->total = $items->isEmpty() ? 0 : 1;
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Customer/Address/Standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,8 +63,7 @@  discard block
 block discarded – undo
63 63
 				}
64 64
 
65 65
 				$cntl->store();
66
-			}
67
-			else
66
+			} else
68 67
 			{
69 68
 				if( ( $item = $items->get( $relId ) ) !== null ) {
70 69
 					$cntl->deleteAddressItem( $item )->store();
@@ -113,8 +112,7 @@  discard block
 block discarded – undo
113 112
 			{
114 113
 				$view->items = $item->getAddressItems();
115 114
 				$view->total = count( $view->items );
116
-			}
117
-			else
115
+			} else
118 116
 			{
119 117
 				$view->items = $item->getAddressItem( $relId );
120 118
 				$view->total = empty( $view->items ) ? 0 : 1;
Please login to merge, or discard this patch.
client/jsonapi/templates/customer/relationships/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\Lists\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
31
-{
30
+$entryFcn = function( \Aimeos\MShop\Common\Item\Lists\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
32 31
 	$relid = $item->getId();
33 32
 	$id = $item->getParentId();
34 33
 	$attributes = $item->toArray();
@@ -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.
client/jsonapi/templates/product/standard.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -103,8 +103,7 @@  discard block
 block discarded – undo
103 103
 }
104 104
 
105 105
 
106
-$entryFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
107
-{
106
+$entryFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
108 107
 	$id = $item->getId();
109 108
 	$attributes = $item->toArray();
110 109
 	$type = $item->getResourceType();
@@ -173,8 +172,7 @@  discard block
 block discarded – undo
173 172
 };
174 173
 
175 174
 
176
-$includeFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
177
-{
175
+$includeFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
178 176
 	$result = [];
179 177
 
180 178
 	foreach( $item->getCatalogItems() as $catItem )
@@ -297,8 +295,7 @@  discard block
 block discarded – undo
297 295
 					$data[] = $entryFcn( $item );
298 296
 					$included = array_merge( $included, $includeFcn( $item ) );
299 297
 				}
300
-			}
301
-			else
298
+			} else
302 299
 			{
303 300
 				$data = $entryFcn( $items );
304 301
 				$included = array_merge( $included, $includeFcn( $items ) );
Please login to merge, or discard this patch.
client/jsonapi/templates/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\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
32
-{
31
+$entryFcn = function( \Aimeos\MShop\Order\Item\Base\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\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
105
-{
103
+$productFcn = function( \Aimeos\MShop\Order\Item\Base\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\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
157
-{
154
+$serviceFcn = function( \Aimeos\MShop\Order\Item\Base\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\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
201
-{
197
+$addressFcn = function( \Aimeos\MShop\Order\Item\Base\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\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config )
235
-{
230
+$couponFcn = function( \Aimeos\MShop\Order\Item\Base\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\Base\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
261
-{
255
+$customerFcn = function( \Aimeos\MShop\Order\Item\Base\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": ["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.
client/jsonapi/templates/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();
@@ -141,8 +140,7 @@  discard block
 block discarded – undo
141 140
 };
142 141
 
143 142
 
144
-$productFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields )
145
-{
143
+$productFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields ) {
146 144
 	$result = [];
147 145
 	$baseItem = $item->getBaseItem();
148 146
 
@@ -186,8 +184,7 @@  discard block
 block discarded – undo
186 184
 };
187 185
 
188 186
 
189
-$serviceFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields )
190
-{
187
+$serviceFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields ) {
191 188
 	$result = [];
192 189
 	$baseItem = $item->getBaseItem();
193 190
 
@@ -223,8 +220,7 @@  discard block
 block discarded – undo
223 220
 };
224 221
 
225 222
 
226
-$addressFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields )
227
-{
223
+$addressFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields ) {
228 224
 	$list = [];
229 225
 	$baseItem = $item->getBaseItem();
230 226
 
@@ -250,8 +246,7 @@  discard block
 block discarded – undo
250 246
 };
251 247
 
252 248
 
253
-$couponFcn = function( \Aimeos\MShop\Order\Item\Iface $item )
254
-{
249
+$couponFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) {
255 250
 	$coupons = [];
256 251
 	$baseItem = $item->getBaseItem();
257 252
 
@@ -266,8 +261,7 @@  discard block
 block discarded – undo
266 261
 };
267 262
 
268 263
 
269
-$customerFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
270
-{
264
+$customerFcn = function( \Aimeos\MShop\Order\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
271 265
 	$result = [];
272 266
 	$baseItem = $item->getBaseItem();
273 267
 
@@ -332,8 +326,7 @@  discard block
 block discarded – undo
332 326
 					$included = array_merge( $included, $serviceFcn( $item ) );
333 327
 					$included = array_merge( $included, $customerFcn( $item ) );
334 328
 				}
335
-			}
336
-			else
329
+			} else
337 330
 			{
338 331
 				$data = $entryFcn( $items, $this->get( 'form' ) );
339 332
 				$included = array_merge( $included, $couponFcn( $items ) );
Please login to merge, or discard this patch.
client/jsonapi/templates/review/standard.php 1 patch
Braces   +2 added lines, -4 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\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
30
-{
29
+$entryFcn = function( \Aimeos\MShop\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
31 30
 	$id = $item->getId();
32 31
 	$attributes = $item->toArray();
33 32
 	$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/customer/standard.php 1 patch
Braces   +3 added lines, -6 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\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
31
-{
30
+$entryFcn = function( \Aimeos\MShop\Customer\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
32 31
 	$id = $item->getId();
33 32
 	$type = $item->getResourceType();
34 33
 	$params = array( 'resource' => $type, 'id' => $id );
@@ -91,8 +90,7 @@  discard block
 block discarded – undo
91 90
 };
92 91
 
93 92
 
94
-$custAddrFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item, array $entry ) use ( $target, $cntl, $action, $config )
95
-{
93
+$custAddrFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) {
96 94
 	$id = $item->getId();
97 95
 	$type = $item->getResourceType();
98 96
 
@@ -114,8 +112,7 @@  discard block
 block discarded – undo
114 112
 };
115 113
 
116 114
 
117
-$custPropFcn = function( \Aimeos\MShop\Common\Item\Property\Iface $item, array $entry ) use ( $target, $cntl, $action, $config )
118
-{
115
+$custPropFcn = function( \Aimeos\MShop\Common\Item\Property\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) {
119 116
 	$id = $item->getId();
120 117
 	$type = $item->getResourceType();
121 118
 
Please login to merge, or discard this patch.
client/jsonapi/templates/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
 	$type = 'review';
34 33
 	$attributes = $item->toArray();
@@ -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.