Passed
Push — master ( 7caa83...0d7bfe )
by Aimeos
02:13
created
client/jsonapi/templates/subscription/standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@
 block discarded – undo
101 101
 				foreach( $items as $item ) {
102 102
 					$data[] = $entryFcn( $item );
103 103
 				}
104
-			}
105
-			else
104
+			} else
106 105
 			{
107 106
 				$data = $entryFcn( $items );
108 107
 			}
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   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -285,8 +285,7 @@
 block discarded – undo
285 285
 					$data[] = $entryFcn( $item );
286 286
 					$included = array_merge( $included, $flatFcn( $inclFcn( $item ) ) );
287 287
 				}
288
-			}
289
-			else
288
+			} else
290 289
 			{
291 290
 				$data = $entryFcn( $items );
292 291
 				$included = $flatFcn( $inclFcn( $items ) );
Please login to merge, or discard this patch.
client/jsonapi/tests/Client/JsonApi/Basket/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/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.
client/jsonapi/templates/basket/standard.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -227,10 +227,13 @@  discard block
 block discarded – undo
227 227
 $allowed = '["GET"]';
228 228
 if( isset( $this->item ) && $this->item->getId() === null )
229 229
 {
230
-	try {
230
+	try
231
+	{
231 232
 		$this->item->check();
232 233
 		$allowed = '["DELETE","GET","PATCH","POST"]';
233
-	} catch( \Aimeos\MShop\Exception $e ) {
234
+	}
235
+	catch( \Aimeos\MShop\Exception $e )
236
+	{
234 237
 		$allowed = '["DELETE","GET","PATCH"]';
235 238
 	}
236 239
 }
@@ -277,10 +280,13 @@  discard block
 block discarded – undo
277 280
 					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'basket', 'id' => $basketId, 'related' => 'coupon'], [], $config ); ?>",
278 281
 					"allow": ["POST"]
279 282
 				}
280
-			<?php else : ?>
283
+			<?php else {
284
+	: ?>
281 285
 				,
282 286
 				"order": {
283
-					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config ); ?>",
287
+					"href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config );
288
+}
289
+?>",
284 290
 					"allow": ["POST"]
285 291
 				}
286 292
 			<?php endif; ?>
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Service/Standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 					$view->items = $provider->getServiceItem();
59 59
 					$view->total = 1;
60 60
 				}
61
-			}
62
-			else
61
+			} else
63 62
 			{
64 63
 				$attributes = $prices = $items = [];
65 64
 				$type = $view->param( 'filter/cs_type' );
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
@@ -75,8 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
 					$this->controller->deleteAddressItem( $entry->id );
77 77
 				}
78
-			}
79
-			else
78
+			} else
80 79
 			{
81 80
 				$this->controller->deleteAddressItem( $relId );
82 81
 			}
@@ -123,8 +122,7 @@  discard block
 block discarded – undo
123 122
 			{
124 123
 				$view->items = $cntl->getItem( $view->param( 'id' ), ['customer/address'] )->getAddressItems();
125 124
 				$view->total = count( $view->items );
126
-			}
127
-			else
125
+			} else
128 126
 			{
129 127
 				$view->items = $cntl->getAddressItem( $relId );
130 128
 				$view->total = 1;
Please login to merge, or discard this patch.