Passed
Push — master ( ed7914...92a34a )
by Aimeos
04:29
created
client/jsonapi/templates/service/standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 	unset( $attributes['service.config'] ); // don't expose private information
42 42
 
43 43
 	$params = array( 'resource' => $type, 'id' => $id );
44
-	$basketParams = [ 'resource' => 'basket', 'id' => 'default', 'related' => 'service', 'relatedid' => $item->getType() ];
44
+	$basketParams = ['resource' => 'basket', 'id' => 'default', 'related' => 'service', 'relatedid' => $item->getType()];
45 45
 
46 46
 	if( isset( $fields[$type] ) ) {
47 47
 		$attributes = array_intersect_key( $attributes, $fields[$type] );
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 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\Service\Item\Iface $item, array $prices, array $feConfig ) use ( $fields, $target, $cntl, $action, $config )
29
-{
28
+$entryFcn = function( \Aimeos\MShop\Service\Item\Iface $item, array $prices, array $feConfig ) use ( $fields, $target, $cntl, $action, $config ) {
30 29
 	$metadata = [];
31 30
 	$id = $item->getId();
32 31
 	$type = $item->getResourceType();
@@ -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
 
@@ -135,8 +133,7 @@  discard block
 block discarded – undo
135 133
 };
136 134
 
137 135
 
138
-$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn )
139
-{
136
+$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) {
140 137
 	$map = [];
141 138
 
142 139
 	if( $item instanceof \Aimeos\MShop\Common\Item\ListRef\Iface )
@@ -160,8 +157,7 @@  discard block
 block discarded – undo
160 157
 };
161 158
 
162 159
 
163
-$flatFcn = function( array $map )
164
-{
160
+$flatFcn = function( array $map ) {
165 161
 	$result = [];
166 162
 
167 163
 	foreach( $map as $list )
@@ -211,8 +207,7 @@  discard block
 block discarded – undo
211 207
 					$data[] = $entryFcn( $item, $prices, $feConfig );
212 208
 					$included = array_merge( $included, $flatFcn( $inclFcn( $item ) ) );
213 209
 				}
214
-			}
215
-			else
210
+			} else
216 211
 			{
217 212
 				$data = $entryFcn( $this->items, $prices, $feConfig );
218 213
 				$included = $flatFcn( $inclFcn( $this->items ) );
Please login to merge, or discard this patch.
client/jsonapi/templates/stock/standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 $first = ( $offset > 0 ? 0 : null );
24 24
 $prev = ( $offset - $limit >= 0 ? $offset - $limit : null );
25 25
 $next = ( $offset + $limit < $total ? $offset + $limit : null );
26
-$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null );
26
+$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null );
27 27
 
28 28
 
29 29
 $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' );
Please login to merge, or discard this 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.
client/jsonapi/templates/product/standard.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 $first = ( $offset > 0 ? 0 : null );
90 90
 $prev = ( $offset - $limit >= 0 ? $offset - $limit : null );
91 91
 $next = ( $offset + $limit < $total ? $offset + $limit : null );
92
-$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null );
92
+$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null );
93 93
 
94 94
 
95 95
 $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' );
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	$type = $item->getResourceType();
110 110
 
111 111
 	$params = array( 'resource' => $type, 'id' => $id );
112
-	$basketParams = [ 'resource' => 'basket', 'id' => 'default', 'related' => 'product' ];
112
+	$basketParams = ['resource' => 'basket', 'id' => 'default', 'related' => 'product'];
113 113
 
114 114
 	if( isset( $fields[$type] ) ) {
115 115
 		$attributes = array_intersect_key( $attributes, $fields[$type] );
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@  discard block
 block discarded – undo
101 101
 }
102 102
 
103 103
 
104
-$entryFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
105
-{
104
+$entryFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
106 105
 	$id = $item->getId();
107 106
 	$attributes = $item->toArray();
108 107
 	$type = $item->getResourceType();
@@ -150,8 +149,7 @@  discard block
 block discarded – undo
150 149
 };
151 150
 
152 151
 
153
-$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, &$refFcn )
154
-{
152
+$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, &$refFcn ) {
155 153
 	$id = $item->getId();
156 154
 	$type = $item->getResourceType();
157 155
 
@@ -199,8 +197,7 @@  discard block
 block discarded – undo
199 197
 };
200 198
 
201 199
 
202
-$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn )
203
-{
200
+$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) {
204 201
 	$map = [];
205 202
 
206 203
 	if( $item instanceof \Aimeos\MShop\Common\Item\ListRef\Iface )
@@ -224,8 +221,7 @@  discard block
 block discarded – undo
224 221
 };
225 222
 
226 223
 
227
-$flatFcn = function( array $map )
228
-{
224
+$flatFcn = function( array $map ) {
229 225
 	$result = [];
230 226
 
231 227
 	foreach( $map as $list )
@@ -290,8 +286,7 @@  discard block
 block discarded – undo
290 286
 					$data[] = $entryFcn( $item );
291 287
 					$included = array_merge( $included, $flatFcn( $inclFcn( $item, [] ) ) );
292 288
 				}
293
-			}
294
-			else
289
+			} else
295 290
 			{
296 291
 				$data = $entryFcn( $items );
297 292
 				$included = $flatFcn( $inclFcn( $items, [] ) );
Please login to merge, or discard this patch.
client/jsonapi/templates/attribute/standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 $first = ( $offset > 0 ? 0 : null );
24 24
 $prev = ( $offset - $limit >= 0 ? $offset - $limit : null );
25 25
 $next = ( $offset + $limit < $total ? $offset + $limit : null );
26
-$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null );
26
+$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null );
27 27
 
28 28
 
29 29
 $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' );
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 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\Attribute\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
39
-{
38
+$entryFcn = function( \Aimeos\MShop\Attribute\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 );
@@ -83,8 +82,7 @@  discard block
 block discarded – undo
83 82
 };
84 83
 
85 84
 
86
-$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, &$refFcn )
87
-{
85
+$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, &$refFcn ) {
88 86
 	$id = $item->getId();
89 87
 	$type = $item->getResourceType();
90 88
 
@@ -132,8 +130,7 @@  discard block
 block discarded – undo
132 130
 };
133 131
 
134 132
 
135
-$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn )
136
-{
133
+$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) {
137 134
 	$map = [];
138 135
 
139 136
 	if( $item instanceof \Aimeos\MShop\Common\Item\ListRef\Iface )
@@ -157,8 +154,7 @@  discard block
 block discarded – undo
157 154
 };
158 155
 
159 156
 
160
-$flatFcn = function( array $map )
161
-{
157
+$flatFcn = function( array $map ) {
162 158
 	$result = [];
163 159
 
164 160
 	foreach( $map as $list )
@@ -222,8 +218,7 @@  discard block
 block discarded – undo
222 218
 					$data[] = $entryFcn( $attrItem );
223 219
 					$included = array_merge( $included, $flatFcn( $inclFcn( $attrItem ) ) );
224 220
 				}
225
-			}
226
-			else
221
+			} else
227 222
 			{
228 223
 				$data = $entryFcn( $items );
229 224
 				$included = $flatFcn( $inclFcn( $items ) );
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Common/Factory/Base.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,8 +99,7 @@
 block discarded – undo
99 99
 				$decorators = $config->get( 'client/jsonapi/' . $dpath . 'decorators/local', [] );
100 100
 				$client = self::addDecorators( $client, $decorators, $classprefix, $context, $path );
101 101
 			}
102
-		}
103
-		else
102
+		} else
104 103
 		{
105 104
 			$classprefix = '\\Aimeos\\Client\\JsonApi\\Common\\Decorator\\';
106 105
 			$client = self::addDecorators( $client, $decorators, $classprefix, $context, $path );
Please login to merge, or discard this patch.
client/jsonapi/templates/supplier/standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 $first = ( $offset > 0 ? 0 : null );
24 24
 $prev = ( $offset - $limit >= 0 ? $offset - $limit : null );
25 25
 $next = ( $offset + $limit < $total ? $offset + $limit : null );
26
-$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null );
26
+$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null );
27 27
 
28 28
 
29 29
 $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' );
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 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\Supplier\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
39
-{
38
+$entryFcn = function( \Aimeos\MShop\Supplier\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 );
@@ -83,8 +82,7 @@  discard block
 block discarded – undo
83 82
 };
84 83
 
85 84
 
86
-$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, $target, $cntl, $action, $config, &$refFcn )
87
-{
85
+$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, $target, $cntl, $action, $config, &$refFcn ) {
88 86
 	$id = $item->getId();
89 87
 	$type = $item->getResourceType();
90 88
 
@@ -132,8 +130,7 @@  discard block
 block discarded – undo
132 130
 };
133 131
 
134 132
 
135
-$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn )
136
-{
133
+$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) {
137 134
 	$map = [];
138 135
 
139 136
 	if( $item instanceof \Aimeos\MShop\Supplier\Item\Iface )
@@ -164,8 +161,7 @@  discard block
 block discarded – undo
164 161
 };
165 162
 
166 163
 
167
-$flatFcn = function( array $map )
168
-{
164
+$flatFcn = function( array $map ) {
169 165
 	$result = [];
170 166
 
171 167
 	foreach( $map as $list )
@@ -230,8 +226,7 @@  discard block
 block discarded – undo
230 226
 					$data[] = $entryFcn( $item );
231 227
 					$included = array_merge( $included, $flatFcn( $inclFcn( $item ) ) );
232 228
 				}
233
-			}
234
-			else
229
+			} else
235 230
 			{
236 231
 				$data = $entryFcn( $items );
237 232
 				$included = $flatFcn( $inclFcn( $items ) );
Please login to merge, or discard this patch.
client/jsonapi/tests/Client/JsonApi/Order/StandardTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -374,7 +374,7 @@
 block discarded – undo
374 374
 		$baseManager = \Aimeos\MShop::create( $this->context, 'order/base' );
375 375
 
376 376
 		$search = $baseManager->createSearch();
377
-		$search->setConditions( $search->compare( '==', 'order.base.price', '672.00') );
377
+		$search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) );
378 378
 
379 379
 		$items = $baseManager->searchItems( $search );
380 380
 
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
 			if( ( $client = @call_user_func_array( [$factory, 'create'], [$context, $path, $name] ) ) === false ) {
60 60
 				throw new \Aimeos\Client\JsonApi\Exception( sprintf( 'Invalid factory "%1$s"', $factory ), 400 );
61 61
 			}
62
-		}
63
-		else
62
+		} else
64 63
 		{
65 64
 			$client = self::createRoot( $context, $path, $name );
66 65
 		}
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Subscription/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 			else
88 88
 			{
89 89
 				$total = 0;
90
-				$items = $cntl->slice( $view->param( 'page/offset', 0), $view->param( 'page/limit', 25 ) )
90
+				$items = $cntl->slice( $view->param( 'page/offset', 0 ), $view->param( 'page/limit', 25 ) )
91 91
 					->sort( $view->param( 'sort' ) )->parse( $view->param( 'filter', [] ) )->search( $total );
92 92
 
93 93
 				$view->items = $items;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@
 block discarded – undo
83 83
 			{
84 84
 				$view->items = $cntl->get( $id );
85 85
 				$view->total = 1;
86
-			}
87
-			else
86
+			} else
88 87
 			{
89 88
 				$total = 0;
90 89
 				$items = $cntl->slice( $view->param( 'page/offset', 0), $view->param( 'page/limit', 25 ) )
Please login to merge, or discard this patch.