Passed
Push — master ( 1d4e58...525fc0 )
by Aimeos
09:55
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/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/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.
client/jsonapi/src/Client/JsonApi/Customer/Review/Standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@  discard block
 block discarded – undo
52 52
 				}
53 53
 
54 54
 				$cntl->delete( array_column( $payload->data, 'id' ) );
55
-			}
56
-			else
55
+			} else
57 56
 			{
58 57
 				$cntl->delete( $relId );
59 58
 			}
@@ -101,8 +100,7 @@  discard block
 block discarded – undo
101 100
 				$total = 0;
102 101
 				$view->items = $cntl->parse( $view->param( 'filter', [] ) )->list( $total );
103 102
 				$view->total = $total;
104
-			}
105
-			else
103
+			} else
106 104
 			{
107 105
 				$view->items = $cntl->get( $relId );
108 106
 				$view->total = 1;
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Stock/Standard.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,9 +158,11 @@
 block discarded – undo
158 158
 		$params = $view->param( 'filter', [] );
159 159
 		$prodIds = (array) $view->param( 'filter/s_prodid', [] );
160 160
 
161
-		if( isset( $params['s_prodcode'] ) ) // backwards compatibility
161
+		if( isset( $params['s_prodcode'] ) ) {
162
+			// backwards compatibility
162 163
 		{
163 164
 			$manager = \Aimeos\MShop::create( $this->getContext(), 'product' );
165
+		}
164 166
 			$filter = $manager->filter()
165 167
 				->slice( 0, count( (array) $params['s_prodcode'] ) )
166 168
 				->add( ['product.code' => $view->param( 'filter/s_prodcode' )] );
Please login to merge, or discard this patch.