Passed
Push — master ( dac304...9a84ac )
by Aimeos
02:40
created
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.
src/Client/Html/Catalog/Home/Standard.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
 	public function data( \Aimeos\Base\View\Iface $view, array &$tags = [], ?string &$expire = null ) : \Aimeos\Base\View\Iface
139 139
 	{
140 140
 		$tree = \Aimeos\Controller\Frontend::create( $this->context(), 'catalog' )->uses( $this->domains() )
141
-			->getTree( \Aimeos\Controller\Frontend\Catalog\Iface::LIST );
141
+			->getTree( \Aimeos\Controller\Frontend\Catalog\Iface::list );
142 142
 
143 143
 		$products = \Aimeos\Controller\Frontend::create( $this->context(), 'product' )->uses( $this->domains() )
144 144
 			->category( $tree->getChildren()->getId()->all(), 'promotion' )->search();
Please login to merge, or discard this patch.
src/Client/Html/Basket/Standard/Standard.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,9 +109,12 @@  discard block
 block discarded – undo
109 109
 		}
110 110
 		catch( \Exception $e )
111 111
 		{
112
-			try {
112
+			try
113
+			{
113 114
 				$view->standardCheckout = $this->save( $val );
114
-			} catch( \Exception $ex ) {
115
+			}
116
+			catch( \Exception $ex )
117
+			{
115 118
 				$view->standardCheckout = false;
116 119
 			}
117 120
 
@@ -177,8 +180,7 @@  discard block
 block discarded – undo
177 180
 				(string) $view->param( 'b_stocktype', 'default' ),
178 181
 				$view->param( 'b_siteid' )
179 182
 			);
180
-		}
181
-		else
183
+		} else
182 184
 		{
183 185
 			foreach( (array) $view->param( 'b_prod', [] ) as $values )
184 186
 			{
Please login to merge, or discard this patch.