Passed
Push — master ( 0dd46a...113e4a )
by Aimeos
04:46
created
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/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/aggregate-standard.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,11 @@
 block discarded – undo
36 36
 	<?php if( isset( $this->errors ) ) : ?>
37 37
 		"errors": <?= json_encode( $this->errors, JSON_PRETTY_PRINT ); ?>
38 38
 
39
-	<?php else : ?>
40
-		"data": <?= json_encode( $entries ); ?>
39
+	<?php else {
40
+	: ?>
41
+		"data": <?= json_encode( $entries );
42
+}
43
+?>
41 44
 
42 45
 	<?php endif; ?>
43 46
 }
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Customer/Relationships/Standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@  discard block
 block discarded – undo
66 66
 				}
67 67
 
68 68
 				$cntl->store();
69
-			}
70
-			else
69
+			} else
71 70
 			{
72 71
 				if( isset( $items[$relId] ) ) {
73 72
 					$cntl->deleteListItem( $items[$relId]->getDomain(), $items[$relId] )->store();
@@ -119,8 +118,7 @@  discard block
 block discarded – undo
119 118
 			{
120 119
 				$view->items = $items;
121 120
 				$view->total = count( $items );
122
-			}
123
-			else
121
+			} else
124 122
 			{
125 123
 				$view->items = isset( $items[$relId] ) ? $items[$relId] : null;
126 124
 				$view->total = empty( $view->items ) ? 0 : 1;
Please login to merge, or discard this patch.
client/jsonapi/templates/basket/standard.php 1 patch
Braces   +10 added lines, -12 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 )
@@ -268,10 +263,13 @@  discard block
 block discarded – undo
268 263
 					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'basket', 'id' => $basketId, 'related' => 'coupon'], [], $config ); ?>",
269 264
 					"allow": ["POST"]
270 265
 				}
271
-			<?php else : ?>
266
+			<?php else {
267
+	: ?>
272 268
 				,
273 269
 				"order": {
274
-					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config ); ?>",
270
+					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config );
271
+}
272
+?>",
275 273
 					"allow": ["POST"]
276 274
 				}
277 275
 			<?php endif; ?>
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Order/Standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@
 block discarded – undo
43 43
 			{
44 44
 				$view->items = $cntl->get( $id );
45 45
 				$view->total = 1;
46
-			}
47
-			else
46
+			} else
48 47
 			{
49 48
 				$total = 0;
50 49
 				$items = $cntl->parse( (array) $view->param( 'filter', [] ) )
Please login to merge, or discard this patch.
client/jsonapi/templates/customer/property/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\Common\Item\Property\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
29
-{
28
+$entryFcn = function( \Aimeos\MShop\Common\Item\Property\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
30 29
 	$id = $item->getId();
31 30
 	$attributes = $item->toArray();
32 31
 	$type = $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.
client/jsonapi/src/Client/JsonApi/Basket/Address/Standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,8 +78,7 @@
 block discarded – undo
78 78
 
79 79
 					$this->controller->deleteAddress( $entry->id );
80 80
 				}
81
-			}
82
-			else
81
+			} else
83 82
 			{
84 83
 				$this->controller->deleteAddress( $relId );
85 84
 			}
Please login to merge, or discard this patch.
client/jsonapi/templates/customer/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\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 );
@@ -94,8 +93,7 @@  discard block
 block discarded – undo
94 93
 };
95 94
 
96 95
 
97
-$custAddrFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item, array $entry ) use ( $target, $cntl, $action, $config )
98
-{
96
+$custAddrFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) {
99 97
 	$id = $item->getId();
100 98
 	$type = $item->getResourceType();
101 99
 
Please login to merge, or discard this patch.