@@ -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 | } |
@@ -81,7 +81,9 @@ |
||
81 | 81 | $feconfig['directdebit.accountowner']['default'] = $fn . ' ' . $ln; |
82 | 82 | } |
83 | 83 | } |
84 | - catch( \Aimeos\MShop\Order\Exception $e ) { ; } // If address isn't available |
|
84 | + catch( \Aimeos\MShop\Order\Exception $e ) |
|
85 | + { |
|
86 | +; } // If address isn't available |
|
85 | 87 | |
86 | 88 | return $this->getConfigItems( $feconfig ); |
87 | 89 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $feconfig['directdebit.accountowner']['default'] = $fn . ' ' . $ln; |
82 | 82 | } |
83 | 83 | } |
84 | - catch( \Aimeos\MShop\Order\Exception $e ) { ; } // If address isn't available |
|
84 | + catch( \Aimeos\MShop\Order\Exception $e ) {; } // If address isn't available |
|
85 | 85 | |
86 | 86 | return $this->getConfigItems( $feconfig ); |
87 | 87 | } |
@@ -612,7 +612,7 @@ |
||
612 | 612 | $cfgPathCount = 'mshop/catalog/manager/standard/count'; |
613 | 613 | |
614 | 614 | if( $search->getSortations() === [] ) { |
615 | - $search->setSortations( [$search->sort( '+', 'catalog.left')] ); |
|
615 | + $search->setSortations( [$search->sort( '+', 'catalog.left' )] ); |
|
616 | 616 | } |
617 | 617 | |
618 | 618 | $results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level ); |
@@ -719,9 +719,12 @@ discard block |
||
719 | 719 | |
720 | 720 | foreach( $sitePath as $siteId ) |
721 | 721 | { |
722 | - try { |
|
722 | + try |
|
723 | + { |
|
723 | 724 | $path = $this->createTreeManager( $siteId )->getPath( $id ); |
724 | - } catch( \Exception $e ) { |
|
725 | + } |
|
726 | + catch( \Exception $e ) |
|
727 | + { |
|
725 | 728 | continue; |
726 | 729 | } |
727 | 730 | |
@@ -756,9 +759,12 @@ discard block |
||
756 | 759 | |
757 | 760 | foreach( $sitePath as $siteId ) |
758 | 761 | { |
759 | - try { |
|
762 | + try |
|
763 | + { |
|
760 | 764 | $node = $this->createTreeManager( $siteId )->getNode( $id, $level, $criteria ); |
761 | - } catch( \Exception $e ) { |
|
765 | + } |
|
766 | + catch( \Exception $e ) |
|
767 | + { |
|
762 | 768 | continue; |
763 | 769 | } |
764 | 770 | |
@@ -838,8 +844,7 @@ discard block |
||
838 | 844 | if( $child->getParentId() !== $item->getParentId() ) { |
839 | 845 | $this->moveItem( $child->getId(), $item->getParentId(), $child->getParentId() ); |
840 | 846 | } |
841 | - } |
|
842 | - else |
|
847 | + } else |
|
843 | 848 | { |
844 | 849 | $this->insertItem( $child, $item->getId() ); |
845 | 850 | } |
@@ -914,8 +919,7 @@ discard block |
||
914 | 919 | * @see mshop/catalog/manager/standard/insert-usage/ansi |
915 | 920 | */ |
916 | 921 | $path = 'mshop/catalog/manager/standard/update-usage'; |
917 | - } |
|
918 | - else |
|
922 | + } else |
|
919 | 923 | { |
920 | 924 | /** mshop/catalog/manager/standard/insert-usage/mysql |
921 | 925 | * Updates the config, editor, ctime and mtime value of an inserted record |
@@ -971,8 +975,7 @@ discard block |
||
971 | 975 | { |
972 | 976 | $stmt->bind( 5, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
973 | 977 | $stmt->bind( 6, $id, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
974 | - } |
|
975 | - else |
|
978 | + } else |
|
976 | 979 | { |
977 | 980 | $stmt->bind( 5, $date ); // ctime |
978 | 981 | $stmt->bind( 6, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | public function testIsAvailable() |
44 | 44 | { |
45 | 45 | $provider = new \Aimeos\MShop\Coupon\Provider\Example( $this->context, $this->couponItem, 'ABCD' ); |
46 | - $object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'ABCD'); |
|
46 | + $object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'ABCD' ); |
|
47 | 47 | $object->setObject( $object ); |
48 | 48 | |
49 | 49 | $this->assertTrue( $object->isAvailable( $this->orderBase ) ); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | public function testIsAvailableExisting() |
54 | 54 | { |
55 | 55 | $provider = new \Aimeos\MShop\Coupon\Provider\Example( $this->context, $this->couponItem, 'OPQR' ); |
56 | - $object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'OPQR'); |
|
56 | + $object = new \Aimeos\MShop\Coupon\Provider\Decorator\Once( $provider, $this->context, $this->couponItem, 'OPQR' ); |
|
57 | 57 | $object->setObject( $object ); |
58 | 58 | |
59 | 59 | $this->assertFalse( $object->isAvailable( $this->orderBase ) ); |
@@ -122,7 +122,7 @@ |
||
122 | 122 | { |
123 | 123 | if( (string) $code !== $this->getCode() ) |
124 | 124 | { |
125 | - $this->values['order.base.coupon.code'] = (string) $this->checkCode( $code );; |
|
125 | + $this->values['order.base.coupon.code'] = (string) $this->checkCode( $code ); ; |
|
126 | 126 | $this->setModified(); |
127 | 127 | } |
128 | 128 |
@@ -380,7 +380,7 @@ |
||
380 | 380 | * |
381 | 381 | * @param boolean $flag True if tax is included in the price value, costs and rebate, false if not |
382 | 382 | * @return \Aimeos\MShop\Price\Item\Iface Price item for chaining method calls |
383 | - */ |
|
383 | + */ |
|
384 | 384 | public function setTaxFlag( $flag ) |
385 | 385 | { |
386 | 386 | if( (bool) $flag !== $this->getTaxFlag() ) |
@@ -135,7 +135,9 @@ |
||
135 | 135 | $feconfig['supplier.code']['default'] = [$value => $address] + $feconfig['supplier.code']['default']; |
136 | 136 | } |
137 | 137 | } |
138 | - catch( \Aimeos\MShop\Order\Exception $e ) {} // If service isn't available |
|
138 | + catch( \Aimeos\MShop\Order\Exception $e ) |
|
139 | + { |
|
140 | +} // If service isn't available |
|
139 | 141 | |
140 | 142 | return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) ); |
141 | 143 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | foreach( $addresses as $id => $addr ) |
76 | 76 | { |
77 | - $addrId = ( count( $addresses ) > 1) ? $item->getCode() . '-' . $id : $item->getCode(); |
|
77 | + $addrId = ( count( $addresses ) > 1 ) ? $item->getCode() . '-' . $id : $item->getCode(); |
|
78 | 78 | |
79 | 79 | $this->feConfig['supplier.code']['default'][$addrId] = preg_replace( "/\n+/m", "\n", sprintf( |
80 | 80 | /// Supplier address format with label (%1$s), company (%2$s), |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | /// address part one (%3$s, e.g street), address part two (%4$s, e.g house number), address part three (%5$s, e.g additional information), |
113 | 113 | /// postal/zip code (%6$s), city (%7$s), state (%8$s), country ID (%9$s), |
114 | 114 | /// e-mail (%10$s), phone (%11$s), facsimile/telefax (%12$s), web site (%13$s) |
115 | - $context->getI18n()->dt( 'mshop', '%1$s, %2$s, %3$s %4$s, %6$s %7$s'), |
|
115 | + $context->getI18n()->dt( 'mshop', '%1$s, %2$s, %3$s %4$s, %6$s %7$s' ), |
|
116 | 116 | $item->getLabel(), |
117 | 117 | $addr->getCompany(), |
118 | 118 | $addr->getAddress1(), |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $attributes['supplier.address'] = $this->feConfig['supplier.code']['short'][$code]; |
193 | 193 | |
194 | 194 | // remove code attribute for summary page / customer email |
195 | - if( $this->getConfigValue('supplier.display-code') == 0 ) { |
|
195 | + if( $this->getConfigValue( 'supplier.display-code' ) == 0 ) { |
|
196 | 196 | unset( $attributes['supplier.code'] ); |
197 | 197 | } |
198 | 198 | } |
@@ -110,7 +110,7 @@ |
||
110 | 110 | $service = $basket->getService( $type, $this->getServiceItem()->getCode() ); |
111 | 111 | |
112 | 112 | if( ( $value = $service->getAttribute( 'time.hourminute', 'delivery' ) ) == '' ) { |
113 | - $feconfig['time.hourminute']['default'] = date( 'H:i', time() + ($minute + 15 - ($minute % 15)) * 60 ); |
|
113 | + $feconfig['time.hourminute']['default'] = date( 'H:i', time() + ( $minute + 15 - ( $minute % 15 ) ) * 60 ); |
|
114 | 114 | } else { |
115 | 115 | $feconfig['time.hourminute']['default'] = $value; |
116 | 116 | } |
@@ -115,7 +115,9 @@ |
||
115 | 115 | $feconfig['time.hourminute']['default'] = $value; |
116 | 116 | } |
117 | 117 | } |
118 | - catch( \Aimeos\MShop\Order\Exception $e ) {} // If service isn't available |
|
118 | + catch( \Aimeos\MShop\Order\Exception $e ) |
|
119 | + { |
|
120 | +} // If service isn't available |
|
119 | 121 | |
120 | 122 | return array_merge( $this->getProvider()->getConfigFE( $basket ), $this->getConfigItems( $feconfig ) ); |
121 | 123 | } |
@@ -90,8 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | if( in_array( $op, $operators['combine'], true ) ) { |
92 | 92 | return $this->createCombineExpression( $op, (array) $value ); |
93 | - } |
|
94 | - else if( in_array( $op, $operators['compare'], true ) ) { |
|
93 | + } else if( in_array( $op, $operators['compare'], true ) ) { |
|
95 | 94 | return $this->createCompareExpression( $op, (array) $value ); |
96 | 95 | } |
97 | 96 | |
@@ -145,11 +144,9 @@ discard block |
||
145 | 144 | |
146 | 145 | if( in_array( $op, $operators['combine'] ) ) { |
147 | 146 | $results[] = $this->createCombineExpression( $op, (array) $entry[$op] ); |
148 | - } |
|
149 | - else if( in_array( $op, $operators['compare'] ) ) { |
|
147 | + } else if( in_array( $op, $operators['compare'] ) ) { |
|
150 | 148 | $results[] = $this->createCompareExpression( $op, (array) $entry[$op] ); |
151 | - } |
|
152 | - else { |
|
149 | + } else { |
|
153 | 150 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Invalid operator "%1$s"', $op ) ); |
154 | 151 | } |
155 | 152 | } |