@@ -114,7 +114,9 @@ |
||
| 114 | 114 | $feconfig['time.hourminute']['default'] = $value; |
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | - catch( \Aimeos\MShop\Service\Exception $e ) {} // If service isn't available |
|
| 117 | + catch( \Aimeos\MShop\Service\Exception $e ) |
|
| 118 | + { |
|
| 119 | +} // If service isn't available |
|
| 118 | 120 | |
| 119 | 121 | return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) ); |
| 120 | 122 | } |
@@ -119,12 +119,13 @@ |
||
| 119 | 119 | return false; |
| 120 | 120 | } |
| 121 | 121 | } |
| 122 | - } |
|
| 123 | - elseif( ( $addresses = $basket->getAddress( $paymentType ) ) !== [] ) // use billing address if no delivery address is available |
|
| 122 | + } elseif( ( $addresses = $basket->getAddress( $paymentType ) ) !== [] ) { |
|
| 123 | + // use billing address if no delivery address is available |
|
| 124 | 124 | { |
| 125 | 125 | foreach( $addresses as $address ) |
| 126 | 126 | { |
| 127 | 127 | $code = $address->getPostal(); |
| 128 | + } |
|
| 128 | 129 | |
| 129 | 130 | if( $this->checkPostalCode( $code, 'postal.delivery-include' ) === false |
| 130 | 131 | || $this->checkPostalCode( $code, 'postal.delivery-exclude' ) === true |
@@ -97,7 +97,9 @@ |
||
| 97 | 97 | $feconfig['date.value']['default'] = $value; |
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | - catch( \Aimeos\MShop\Service\Exception $e ) {} // If service isn't available |
|
| 100 | + catch( \Aimeos\MShop\Service\Exception $e ) |
|
| 101 | + { |
|
| 102 | +} // If service isn't available |
|
| 101 | 103 | |
| 102 | 104 | return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) ); |
| 103 | 105 | } |
@@ -129,7 +129,9 @@ |
||
| 129 | 129 | $feconfig['delivery.type']['default'] = $values; |
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | - catch( \Aimeos\MShop\Service\Exception $e ) {} // If service isn't available |
|
| 132 | + catch( \Aimeos\MShop\Service\Exception $e ) |
|
| 133 | + { |
|
| 134 | +} // If service isn't available |
|
| 133 | 135 | |
| 134 | 136 | return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) ); |
| 135 | 137 | } |
@@ -59,8 +59,7 @@ discard block |
||
| 59 | 59 | foreach( $value as $key => $product ) { |
| 60 | 60 | $value[$key] = $this->updatePrice( $product ); |
| 61 | 61 | } |
| 62 | - } |
|
| 63 | - else |
|
| 62 | + } else |
|
| 64 | 63 | { |
| 65 | 64 | $value = $this->updatePrice( $value ); |
| 66 | 65 | } |
@@ -139,8 +138,7 @@ discard block |
||
| 139 | 138 | { |
| 140 | 139 | $priceManager = \Aimeos\MShop::create( $this->context(), 'price' ); |
| 141 | 140 | |
| 142 | - $sortFcn = function( $a, $b ) use( $priceManager, $attrQtys ) |
|
| 143 | - { |
|
| 141 | + $sortFcn = function( $a, $b ) use( $priceManager, $attrQtys ) { |
|
| 144 | 142 | if( ( $pricesA = $a->getRefItems( 'price', 'default', 'default' )->toArray() ) === [] ) { |
| 145 | 143 | return 1; |
| 146 | 144 | } |
@@ -203,8 +201,7 @@ discard block |
||
| 203 | 201 | { |
| 204 | 202 | $list = $this->sortByPrice( $list, $attrQtys ); |
| 205 | 203 | $priceItem = $this->addPrices( $priceItem, $list, $attrQtys, (int) $prodConf[$type] ); |
| 206 | - } |
|
| 207 | - else |
|
| 204 | + } else |
|
| 208 | 205 | { |
| 209 | 206 | $priceItem = $this->addPrices( $priceItem, $list, $attrQtys, 0 ); |
| 210 | 207 | } |
@@ -385,8 +385,7 @@ discard block |
||
| 385 | 385 | $attributes[$attribute->getParentId()][] = $attribute; |
| 386 | 386 | $attribute->setParentId( null ); |
| 387 | 387 | $attribute->setId( null ); |
| 388 | - } |
|
| 389 | - else |
|
| 388 | + } else |
|
| 390 | 389 | { |
| 391 | 390 | $attributes[$attribute->getParentId()][$id] = $attribute; |
| 392 | 391 | } |
@@ -405,8 +404,7 @@ discard block |
||
| 405 | 404 | $map[$item->getBaseId()][$item->getPosition()] = $item; |
| 406 | 405 | |
| 407 | 406 | $subProducts = []; |
| 408 | - } |
|
| 409 | - else |
|
| 407 | + } else |
|
| 410 | 408 | { // in case it's a sub-product |
| 411 | 409 | $subProducts[$item->getPosition()] = $item; |
| 412 | 410 | } |
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | |
| 816 | 816 | foreach( $price->getTaxrates() as $name => $taxrate ) |
| 817 | 817 | { |
| 818 | - $price = (clone $price)->setTaxRate( $taxrate ); |
|
| 818 | + $price = ( clone $price )->setTaxRate( $taxrate ); |
|
| 819 | 819 | |
| 820 | 820 | if( isset( $taxes[$name][$taxrate] ) ) { |
| 821 | 821 | $taxes[$name][$taxrate]->addItem( $price, $product->getQuantity() ); |
@@ -833,7 +833,7 @@ discard block |
||
| 833 | 833 | |
| 834 | 834 | foreach( $price->getTaxrates() as $name => $taxrate ) |
| 835 | 835 | { |
| 836 | - $price = (clone $price)->setTaxRate( $taxrate ); |
|
| 836 | + $price = ( clone $price )->setTaxRate( $taxrate ); |
|
| 837 | 837 | |
| 838 | 838 | if( isset( $taxes[$name][$taxrate] ) ) { |
| 839 | 839 | $taxes[$name][$taxrate]->addItem( $price ); |
@@ -306,8 +306,7 @@ |
||
| 306 | 306 | if( empty( $search->getSortations() ) && ( $attribute = reset( $attributes ) ) !== false ) |
| 307 | 307 | { |
| 308 | 308 | $search = ( clone $search )->setSortations( [$search->sort( '+', $attribute->getCode() )] ); |
| 309 | - } |
|
| 310 | - elseif( !empty( $search->getSortations() ) ) |
|
| 309 | + } elseif( !empty( $search->getSortations() ) ) |
|
| 311 | 310 | { |
| 312 | 311 | $names = $search->translate( $search->getSortations(), [], $funcs ); |
| 313 | 312 | $cols = $search->translate( $search->getSortations(), $translations, $funcs ); |
@@ -305,8 +305,7 @@ |
||
| 305 | 305 | */ |
| 306 | 306 | $path = 'mshop/customer/manager/group/insert'; |
| 307 | 307 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
| 308 | - } |
|
| 309 | - else |
|
| 308 | + } else |
|
| 310 | 309 | { |
| 311 | 310 | /** mshop/customer/manager/group/update/mysql |
| 312 | 311 | * Updates an existing customer group record in the database |