Passed
Pull Request — master (#202)
by
unknown
02:33
created
src/Client/Html/Base.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -384,7 +384,7 @@
 block discarded – undo
384 384
 		$domain = str_replace( '/', '_', $item->getResourceType() ); // maximum compatiblity
385 385
 
386 386
 		if( in_array( $item->getResourceType(), ['catalog', 'product', 'supplier'] ) ) {
387
-			$tags[] = $tagAll ? $domain . '-' . $item->getId() : $domain ;
387
+			$tags[] = $tagAll ? $domain . '-' . $item->getId() : $domain;
388 388
 		}
389 389
 
390 390
 		if( $item instanceof \Aimeos\MShop\Common\Item\Time\Iface && ( $date = $item->getDateEnd() ) !== null ) {
Please login to merge, or discard this patch.
src/Client/Html/Checkout/Standard/Address/Delivery/Standard.php 1 patch
Braces   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -337,19 +337,22 @@  discard block
 block discarded – undo
337 337
 		$disable = $view->config( 'client/html/checkout/standard/address/delivery/disable-new', false );
338 338
 		$type = \Aimeos\MShop\Order\Item\Address\Base::TYPE_DELIVERY;
339 339
 
340
-		if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) === 'null' && $disable === false ) // new address
340
+		if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) === 'null' && $disable === false ) {
341
+			// new address
341 342
 		{
342 343
 			$params = $view->param( 'ca_delivery', [] );
344
+		}
343 345
 
344 346
 			if( ( $view->addressDeliveryError = $this->checkFields( $params ) ) !== [] ) {
345 347
 				throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one delivery address part is missing or invalid' ) );
346 348
 			}
347 349
 
348 350
 			$ctrl->addAddress( $type, $params, 0 );
349
-		}
350
-		else if( ( $option = $view->param( 'ca_deliveryoption' ) ) !== 'like' ) // existing address
351
+		} else if( ( $option = $view->param( 'ca_deliveryoption' ) ) !== 'like' ) {
352
+			// existing address
351 353
 		{
352 354
 			$params = $view->param( 'ca_delivery_' . $option, [] );
355
+		}
353 356
 
354 357
 			if( !empty( $params ) && ( $view->addressDeliveryError = $this->checkFields( $params ) ) !== [] ) {
355 358
 				throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one delivery address part is missing or invalid' ) );
@@ -362,13 +365,11 @@  discard block
 block discarded – undo
362 365
 				$params = array_replace( $address->toArray(), $params + ['order.address.addressid' => $option] );
363 366
 				$addr = $ctrl->addAddress( $type, $params, 0 )->get()->getAddress( $type, 0 ); // sanitize address first
364 367
 				$custCntl->addAddressItem( $address->copyFrom( $addr ), $option )->store(); // update existing address
365
-			}
366
-			else
368
+			} else
367 369
 			{
368 370
 				$ctrl->addAddress( $type, $params, 0 );
369 371
 			}
370
-		}
371
-		else
372
+		} else
372 373
 		{
373 374
 			$ctrl->deleteAddress( $type );
374 375
 		}
@@ -597,8 +598,7 @@  discard block
 block discarded – undo
597 598
 					$invalid[$key] = $name;
598 599
 					unset( $params[$key] );
599 600
 				}
600
-			}
601
-			else
601
+			} else
602 602
 			{
603 603
 				unset( $params[$key] );
604 604
 			}
Please login to merge, or discard this patch.
src/Client/Html/Checkout/Confirm/Standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@
 block discarded – undo
79 79
 		{
80 80
 			$serviceCntl = \Aimeos\Controller\Frontend::create( $context, 'service' );
81 81
 			$orderItem = $serviceCntl->updateSync( $view->request(), $code, $orderid );
82
-		}
83
-		else
82
+		} else
84 83
 		{
85 84
 			$orderItem = $orderCntl->get( $orderid, false );
86 85
 		}
Please login to merge, or discard this patch.
src/Client/Html/Checkout/Standard/Process/Standard.php 1 patch
Braces   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -211,27 +211,26 @@
 block discarded – undo
211 211
 			$order = $basketCntl->store();
212 212
 
213 213
 			$context->session()->set( 'aimeos/orderid', $order->getId() );
214
-		}
215
-		elseif( ( $orderid = $context->session()->get( 'aimeos/orderid' ) ) !== null )
214
+		} elseif( ( $orderid = $context->session()->get( 'aimeos/orderid' ) ) !== null )
216 215
 		{
217 216
 			$refs = $context->config()->get( 'mshop/order/manager/subdomains', [] );
218 217
 			$order = $orderCntl->uses( $refs )->get( $orderid, false );
219
-		}
220
-		else
218
+		} else
221 219
 		{
222 220
 			return;
223 221
 		}
224 222
 
225
-		if( ( $form = $this->processPayment( $order ) ) === null ) // no payment service available
223
+		if( ( $form = $this->processPayment( $order ) ) === null ) {
224
+			// no payment service available
226 225
 		{
227 226
 			$services = $order->getService( \Aimeos\MShop\Order\Item\Service\Base::TYPE_PAYMENT );
227
+		}
228 228
 			$args = ( $service = reset( $services ) ) ? ['code' => $service->getCode()] : [];
229 229
 
230 230
 			$orderCntl->save( $order->setStatusPayment( \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED ) );
231 231
 			$view->standardUrlNext = $this->getUrlConfirm( $view, $args, ['absoluteUri' => true] );
232 232
 			$view->standardMethod = 'POST';
233
-		}
234
-		else
233
+		} else
235 234
 		{
236 235
 			$this->addFormData( $view, $form );
237 236
 		}
Please login to merge, or discard this patch.
src/Client/Html/Basket/Standard/Standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -213,8 +213,7 @@
 block discarded – undo
213 213
 				(string) $view->param( 'b_stocktype', 'default' ),
214 214
 				$view->param( 'b_siteid' )
215 215
 			);
216
-		}
217
-		else
216
+		} else
218 217
 		{
219 218
 			foreach( (array) $view->param( 'b_prod', [] ) as $values )
220 219
 			{
Please login to merge, or discard this patch.
src/Client/Html/Checkout/Standard/Payment/Standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -149,8 +149,7 @@
 block discarded – undo
149 149
 						$value = $oservice->getAttribute( $key, 'payment' ) ?: $value;
150 150
 						$item->value = $oservice->getAttribute( $key, 'payment/hidden' ) ?: $value;
151 151
 					}
152
-				}
153
-				else
152
+				} else
154 153
 				{
155 154
 					foreach( $attr as $key => $item ) {
156 155
 						$item->value = is_array( $item->getDefault() ) ? key( $item->getDefault() ) : $item->getDefault();
Please login to merge, or discard this patch.
src/Client/Html/Checkout/Standard/Address/Billing/Standard.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -464,15 +464,16 @@  discard block
 block discarded – undo
464 464
 		$disable = $view->config( 'client/html/checkout/standard/address/billing/disable-new', false );
465 465
 		$type = \Aimeos\MShop\Order\Item\Address\Base::TYPE_PAYMENT;
466 466
 
467
-		if( ( $option = $view->param( 'ca_billingoption', 'null' ) ) === 'null' && $disable === false ) // new address
467
+		if( ( $option = $view->param( 'ca_billingoption', 'null' ) ) === 'null' && $disable === false ) {
468
+			// new address
468 469
 		{
469 470
 			$params = $view->param( 'ca_billing', [] );
471
+		}
470 472
 
471 473
 			if( ( $view->addressBillingError = $this->checkFields( $params ) ) !== [] ) {
472 474
 				return false;
473 475
 			}
474
-		}
475
-		else // existing address
476
+		} else // existing address
476 477
 		{
477 478
 			$params = $view->param( 'ca_billing_' . $option, [] ) + $view->param( 'ca_extra', [] );
478 479
 
@@ -616,8 +617,7 @@  discard block
 block discarded – undo
616 617
 					$invalid[$key] = $name;
617 618
 					unset( $params[$key] );
618 619
 				}
619
-			}
620
-			else
620
+			} else
621 621
 			{
622 622
 				unset( $params[$key] );
623 623
 			}
Please login to merge, or discard this patch.