Passed
Pull Request — master (#107)
by Jonas
03:25
created
client/html/templates/checkout/standard/summary-body-standard.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,11 @@
 block discarded – undo
83 83
 						$this->config( 'client/html/checkout/standard/summary/address', 'common/summary/address-standard' ),
84 84
 						['addresses' => $addresses, 'type' => 'delivery']
85 85
 					); ?>
86
-				<?php else : ?>
87
-					<?= $enc->html( $this->translate( 'client', 'like billing address' ), $enc::TRUST ); ?>
86
+				<?php else {
87
+	: ?>
88
+					<?= $enc->html( $this->translate( 'client', 'like billing address' ), $enc::TRUST );
89
+}
90
+?>
88 91
 				<?php endif; ?>
89 92
 			</div>
90 93
 		</div>
Please login to merge, or discard this patch.
client/html/templates/checkout/standard/delivery-body-standard.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,14 +41,17 @@
 block discarded – undo
41 41
 									$this->translate( 'currency', $price->getCurrencyId() )
42 42
 								) ); ?>
43 43
 							</span>
44
-						<?php else : ?>
44
+						<?php else {
45
+	: ?>
45 46
 							<span class="price-value">
46 47
 								<?= $enc->html( sprintf(
47 48
 									/// Price format with price value (%1$s) and currency (%2$s)
48 49
 									$this->translate( 'client/code', 'price:default', null, 0, false ) ?: $this->translate( 'client', '%1$s %2$s' ),
49 50
 									$this->number( $price->getCosts() > 0 ? $price->getCosts() : 0, $price->getPrecision() ),
50 51
 									$this->translate( 'currency', $price->getCurrencyId() )
51
-								) ); ?>
52
+								) );
53
+}
54
+?>
52 55
 							</span>
53 56
 						<?php endif; ?>
54 57
 
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Standard/Process/Account/Standard.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -219,9 +219,12 @@
 block discarded – undo
219 219
 		$context = $this->getContext();
220 220
 		$cntl = \Aimeos\Controller\Frontend::create( $context, 'customer' );
221 221
 
222
-		try {
222
+		try
223
+		{
223 224
 			$id = $cntl->find( $addr->getEmail() )->getId();
224
-		} catch( \Exception $e ) {
225
+		}
226
+		catch( \Exception $e )
227
+		{
225 228
 			$id = $new ? $cntl->add( $addr->toArray() )->store()->get()->getId() : null;
226 229
 		}
227 230
 
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Standard/Address/Billing/Standard.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -645,15 +645,16 @@  discard block
 block discarded – undo
645 645
 		$disable = $view->config( 'client/html/checkout/standard/address/billing/disable-new', false );
646 646
 		$type = \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT;
647 647
 
648
-		if( ( $option = $view->param( 'ca_billingoption', 'null' ) ) === 'null' && $disable === false ) // new address
648
+		if( ( $option = $view->param( 'ca_billingoption', 'null' ) ) === 'null' && $disable === false ) {
649
+			// new address
649 650
 		{
650 651
 			$params = $view->param( 'ca_billing', [] );
652
+		}
651 653
 
652 654
 			if( ( $view->addressBillingError = $this->checkFields( $params ) ) !== [] ) {
653 655
 				throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one billing address part is missing or invalid' ) );
654 656
 			}
655
-		}
656
-		else // existing address
657
+		} else // existing address
657 658
 		{
658 659
 			$params = $view->param( 'ca_billing_' . $option, [] ) + $view->param( 'ca_extra', [] );
659 660
 
@@ -797,8 +798,7 @@  discard block
 block discarded – undo
797 798
 					$invalid[$key] = $name;
798 799
 					unset( $params[$key] );
799 800
 				}
800
-			}
801
-			else
801
+			} else
802 802
 			{
803 803
 				unset( $params[$key] );
804 804
 			}
Please login to merge, or discard this patch.
client/html/src/Client/Html/Checkout/Standard/Address/Delivery/Standard.php 1 patch
Braces   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -524,19 +524,22 @@  discard block
 block discarded – undo
524 524
 		$disable = $view->config( 'client/html/checkout/standard/address/delivery/disable-new', false );
525 525
 		$type = \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_DELIVERY;
526 526
 
527
-		if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) === 'null' && $disable === false ) // new address
527
+		if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) === 'null' && $disable === false ) {
528
+			// new address
528 529
 		{
529 530
 			$params = $view->param( 'ca_delivery', [] );
531
+		}
530 532
 
531 533
 			if( ( $view->addressDeliveryError = $this->checkFields( $params ) ) !== [] ) {
532 534
 				throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one delivery address part is missing or invalid' ) );
533 535
 			}
534 536
 
535 537
 			$ctrl->addAddress( $type, $params, 0 );
536
-		}
537
-		else if( ( $option = $view->param( 'ca_deliveryoption' ) ) !== 'like' ) // existing address
538
+		} else if( ( $option = $view->param( 'ca_deliveryoption' ) ) !== 'like' ) {
539
+			// existing address
538 540
 		{
539 541
 			$params = $view->param( 'ca_delivery_' . $option, [] );
542
+		}
540 543
 
541 544
 			if( !empty( $params ) && ( $view->addressDeliveryError = $this->checkFields( $params ) ) !== [] ) {
542 545
 				throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one delivery address part is missing or invalid' ) );
@@ -549,13 +552,11 @@  discard block
 block discarded – undo
549 552
 				$params = array_replace( $address->toArray(), $params + ['order.base.address.addressid' => $option] );
550 553
 				$addr = $ctrl->addAddress( $type, $params, 0 )->get()->getAddress( $type, 0 ); // sanitize address first
551 554
 				$custCntl->addAddressItem( $address->copyFrom( $addr ), $option )->store(); // update existing address
552
-			}
553
-			else
555
+			} else
554 556
 			{
555 557
 				$ctrl->addAddress( $type, $params, 0 );
556 558
 			}
557
-		}
558
-		else
559
+		} else
559 560
 		{
560 561
 			$ctrl->deleteAddress( $type );
561 562
 		}
@@ -787,8 +788,7 @@  discard block
 block discarded – undo
787 788
 					$invalid[$key] = $name;
788 789
 					unset( $params[$key] );
789 790
 				}
790
-			}
791
-			else
791
+			} else
792 792
 			{
793 793
 				unset( $params[$key] );
794 794
 			}
Please login to merge, or discard this patch.
client/html/templates/account/subscription/lists-body-standard.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,8 +129,11 @@
 block discarded – undo
129 129
 									<span class="value col-7">
130 130
 										<?php if( $interval = $this->get( 'listsIntervalItems', map() )->get( $item->getInterval() ) ) : ?>
131 131
 											<?= $enc->html( $interval->getName(), $enc::TRUST ); ?>
132
-										<?php else : ?>
133
-											<?= $enc->html( $item->getInterval(), $enc::TRUST ); ?>
132
+										<?php else {
133
+	: ?>
134
+											<?= $enc->html( $item->getInterval(), $enc::TRUST );
135
+}
136
+?>
134 137
 										<?php endif; ?>
135 138
 									</span>
136 139
 								</div>
Please login to merge, or discard this patch.
client/html/templates/email/payment/pdf-body-standard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 $this->pdf->setFont( 'dejavusans', '', 10 );
25 25
 
26 26
 $vmargin = [
27
-	'h1' => [ // HTML tag
27
+	'h1' => [// HTML tag
28 28
 		0 => ['h' => 1.5, 'n' => 0], // space before = h * n
29 29
 		1 => ['h' => 1.5, 'n' => 3] // space after = h * n
30 30
 	],
Please login to merge, or discard this patch.
client/html/src/Client/Html/Catalog/Filter/Attribute/Standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -319,13 +319,11 @@
 block discarded – undo
319 319
 			{
320 320
 				$item = $item->set( 'checked', true );
321 321
 				unset( $attrparams['f_attrid'][$key] );
322
-			}
323
-			elseif( ( $key = array_search( $id, $oneIds ) ) !== false )
322
+			} elseif( ( $key = array_search( $id, $oneIds ) ) !== false )
324 323
 			{
325 324
 				$item = $item->set( 'checked', true );
326 325
 				unset( $attrparams['f_oneid'][$key] );
327
-			}
328
-			elseif( ( $key = array_search( $id, $optIds ) ) !== false )
326
+			} elseif( ( $key = array_search( $id, $optIds ) ) !== false )
329 327
 			{
330 328
 				$item = $item->set( 'checked', true );
331 329
 				unset( $attrparams['f_optid'][$key] );
Please login to merge, or discard this patch.
client/html/src/Client/Html/Catalog/Home/Standard.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -166,8 +166,7 @@  discard block
 block discarded – undo
166 166
 			}
167 167
 
168 168
 			$html = $view->render( $config->get( $tplconf, $default ) );
169
-		}
170
-		else
169
+		} else
171 170
 		{
172 171
 			$html = $this->modifyBody( $html, $uid );
173 172
 		}
@@ -236,8 +235,7 @@  discard block
 block discarded – undo
236 235
 			{
237 236
 				$this->logException( $e );
238 237
 			}
239
-		}
240
-		else
238
+		} else
241 239
 		{
242 240
 			$html = $this->modifyHeader( $html, $uid );
243 241
 		}
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -443,7 +443,7 @@
 block discarded – undo
443 443
 		}
444 444
 
445 445
 		$tree = \Aimeos\Controller\Frontend::create( $context, 'catalog' )->uses( $domains )
446
-			->getTree( \Aimeos\Controller\Frontend\Catalog\Iface::LIST );
446
+			->getTree( \Aimeos\Controller\Frontend\Catalog\Iface::list );
447 447
 
448 448
 
449 449
 		$articles = map();
Please login to merge, or discard this patch.