Passed
Push — master ( 5fd917...123026 )
by Aimeos
14:32
created
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 ) ?: $value;
150 150
 						$item->value = $oservice->getAttribute( $key, '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/Process/Account/Standard.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,9 +76,12 @@
 block discarded – undo
76 76
 		$context = $this->context();
77 77
 		$cntl = \Aimeos\Controller\Frontend::create( $context, 'customer' );
78 78
 
79
-		try {
79
+		try
80
+		{
80 81
 			$customer = $cntl->find( $addr->getEmail() );
81
-		} catch( \Exception $e ) {
82
+		}
83
+		catch( \Exception $e )
84
+		{
82 85
 			$customer = $new ? $cntl->add( $addr->toArray() )->store()->get() : null;
83 86
 		}
84 87
 
Please login to merge, or discard this patch.
src/Client/Html/Checkout/Standard/Address/Payment/Standard.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -427,15 +427,16 @@
 block discarded – undo
427 427
 		$disable = $view->config( 'client/html/checkout/standard/address/payment/disable-new', false );
428 428
 		$type = \Aimeos\MShop\Order\Item\Address\Base::TYPE_PAYMENT;
429 429
 
430
-		if( ( $option = $view->param( 'ca_paymentoption', 'null' ) ) === 'null' && $disable === false ) // new address
430
+		if( ( $option = $view->param( 'ca_paymentoption', 'null' ) ) === 'null' && $disable === false ) {
431
+			// new address
431 432
 		{
432 433
 			$params = $view->param( 'ca_payment', [] );
434
+		}
433 435
 
434 436
 			if( ( $view->addressPaymentError = $this->checkFields( $params ) ) !== [] ) {
435 437
 				throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one payment address part is missing or invalid' ) );
436 438
 			}
437
-		}
438
-		else // existing address
439
+		} else // existing address
439 440
 		{
440 441
 			$params = $view->param( 'ca_payment_' . $option, [] );
441 442
 
Please login to merge, or discard this patch.
src/Client/Html/Checkout/Standard/Address/Delivery/Standard.php 1 patch
Braces   +8 added lines, -7 removed lines patch added patch discarded remove patch
@@ -316,19 +316,22 @@  discard block
 block discarded – undo
316 316
 		$disable = $view->config( 'client/html/checkout/standard/address/delivery/disable-new', false );
317 317
 		$type = \Aimeos\MShop\Order\Item\Address\Base::TYPE_DELIVERY;
318 318
 
319
-		if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) === 'null' && $disable === false ) // new address
319
+		if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) === 'null' && $disable === false ) {
320
+			// new address
320 321
 		{
321 322
 			$params = $view->param( 'ca_delivery', [] );
323
+		}
322 324
 
323 325
 			if( ( $view->addressDeliveryError = $this->checkFields( $params ) ) !== [] ) {
324 326
 				throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one delivery address part is missing or invalid' ) );
325 327
 			}
326 328
 
327 329
 			$ctrl->addAddress( $type, $params, 0 );
328
-		}
329
-		else if( ( $option = $view->param( 'ca_deliveryoption' ) ) !== 'like' ) // existing address
330
+		} else if( ( $option = $view->param( 'ca_deliveryoption' ) ) !== 'like' ) {
331
+			// existing address
330 332
 		{
331 333
 			$params = $view->param( 'ca_delivery_' . $option, [] );
334
+		}
332 335
 
333 336
 			if( !empty( $params ) && ( $view->addressDeliveryError = $this->checkFields( $params ) ) !== [] ) {
334 337
 				throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one delivery address part is missing or invalid' ) );
@@ -341,13 +344,11 @@  discard block
 block discarded – undo
341 344
 				$params = array_replace( $address->toArray(), $params + ['order.address.addressid' => $option] );
342 345
 				$addr = $ctrl->addAddress( $type, $params, 0 )->get()->getAddress( $type, 0 ); // sanitize address first
343 346
 				$custCntl->addAddressItem( $address->copyFrom( $addr ), $option )->store(); // update existing address
344
-			}
345
-			else
347
+			} else
346 348
 			{
347 349
 				$ctrl->addAddress( $type, $params, 0 );
348 350
 			}
349
-		}
350
-		else
351
+		} else
351 352
 		{
352 353
 			$ctrl->deleteAddress( $type );
353 354
 		}
Please login to merge, or discard this patch.
templates/client/html/common/partials/attribute.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -159,7 +159,8 @@  discard block
 block discarded – undo
159 159
 
160 160
 					</ul>
161 161
 
162
-				<?php else : ?>
162
+				<?php else {
163
+	: ?>
163 164
 
164 165
 					<input type="hidden" value="1" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrconfid', 'qty', ''] ) ) ?>">
165 166
 					<select id="select-<?= $enc->attr( $key ) ?>" class="form-select select-list"
@@ -211,7 +212,9 @@  discard block
 block discarded – undo
211 212
 							value="<?= $enc->attr( $price->getValue() ) ?>"
212 213
 						<?php endif ?>
213 214
 					>
214
-				<?php break; case 'date': ?>
215
+				<?php break;
216
+}
217
+case 'date': ?>
215 218
 					<input id="select-<?= $enc->attr( $key ) ?>" class="form-control" type="date" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrcustid', $id] ) ) ?>">
216 219
 				<?php break; default: ?>
217 220
 					<input id="select-<?= $enc->attr( $key ) ?>" class="form-control" type="text" name="<?= $enc->attr( $this->formparam( ['b_prod', 0, 'attrcustid', $id] ) ) ?>">
Please login to merge, or discard this patch.