@@ -167,8 +167,7 @@ discard block |
||
167 | 167 | |
168 | 168 | $this->executeList( $schemaDiff->toSaveSql( $platform ), $rname ); |
169 | 169 | $this->status( 'done' ); |
170 | - } |
|
171 | - else |
|
170 | + } else |
|
172 | 171 | { |
173 | 172 | $this->status( 'OK' ); |
174 | 173 | } |
@@ -207,8 +206,7 @@ discard block |
||
207 | 206 | |
208 | 207 | $this->executeList( $schemaDiff->toSaveSql( $platform ), $rname ); |
209 | 208 | $this->status( 'done' ); |
210 | - } |
|
211 | - else |
|
209 | + } else |
|
212 | 210 | { |
213 | 211 | $this->status( 'OK' ); |
214 | 212 | } |
@@ -229,8 +227,7 @@ discard block |
||
229 | 227 | if( $schema->columnExists( $table, 'typeid' ) ) { |
230 | 228 | $this->execute( $stmt, $rname ); |
231 | 229 | $this->status( 'done' ); |
232 | - } |
|
233 | - else |
|
230 | + } else |
|
234 | 231 | { |
235 | 232 | $this->status( 'OK' ); |
236 | 233 | } |
@@ -110,8 +110,7 @@ |
||
110 | 110 | \Aimeos\MW\Common\Base::checkClass( \Aimeos\MShop\Order\Item\Base\Product\Iface::class, $orderProduct ); |
111 | 111 | $list[] = $orderProduct->getProductId(); |
112 | 112 | } |
113 | - } |
|
114 | - else |
|
113 | + } else |
|
115 | 114 | { |
116 | 115 | \Aimeos\MW\Common\Base::checkClass( \Aimeos\MShop\Order\Item\Base\Product\Iface::class, $value ); |
117 | 116 | $list[] = $value->getProductId(); |
@@ -124,8 +124,7 @@ |
||
124 | 124 | $subList = self::createControllers( $it, $context, $aimeos, $pref ); |
125 | 125 | |
126 | 126 | $list = array_merge( $list, $subList ); |
127 | - } |
|
128 | - else if( $prefix !== '' && $entry->getType() === 'file' |
|
127 | + } else if( $prefix !== '' && $entry->getType() === 'file' |
|
129 | 128 | && $entry->getBaseName( '.php' ) === 'Factory' ) |
130 | 129 | { |
131 | 130 | $list[$prefix] = self::create( $context, $aimeos, $prefix ); |
@@ -133,8 +133,7 @@ |
||
133 | 133 | $this->checkWithoutCurrency( $order, $entry ); |
134 | 134 | $this->checkWithCurrency( $order, $entry ); |
135 | 135 | } |
136 | - } |
|
137 | - else |
|
136 | + } else |
|
138 | 137 | { |
139 | 138 | \Aimeos\MW\Common\Base::checkClass( \Aimeos\MShop\Order\Item\Base\Product\Iface::class, $value ); |
140 | 139 |
@@ -96,9 +96,11 @@ |
||
96 | 96 | $code = $orderProduct->getProductCode(); |
97 | 97 | $prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty ); |
98 | 98 | |
99 | - foreach( $orderProduct->getProducts() as $prodItem ) // calculate bundled products |
|
99 | + foreach( $orderProduct->getProducts() as $prodItem ) { |
|
100 | + // calculate bundled products |
|
100 | 101 | { |
101 | 102 | $qty = $prodItem->getQuantity(); |
103 | + } |
|
102 | 104 | $code = $prodItem->getProductCode(); |
103 | 105 | $prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty ); |
104 | 106 | } |
@@ -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 |
@@ -53,8 +53,7 @@ discard block |
||
53 | 53 | ) { |
54 | 54 | $this->execute( 'ALTER TABLE "mshop_locale" DROP FOREIGN KEY "fk_msloc_langid"', 'db-locale' ); |
55 | 55 | $this->status( 'done' ); |
56 | - } |
|
57 | - else |
|
56 | + } else |
|
58 | 57 | { |
59 | 58 | $this->status( 'OK' ); |
60 | 59 | } |
@@ -66,8 +65,7 @@ discard block |
||
66 | 65 | ) { |
67 | 66 | $this->execute( 'ALTER TABLE "mshop_locale" DROP FOREIGN KEY "fk_msloc_currid"', 'db-locale' ); |
68 | 67 | $this->status( 'done' ); |
69 | - } |
|
70 | - else |
|
68 | + } else |
|
71 | 69 | { |
72 | 70 | $this->status( 'OK' ); |
73 | 71 | } |
@@ -26,7 +26,8 @@ discard block |
||
26 | 26 | |
27 | 27 | public function test() |
28 | 28 | { |
29 | - try { |
|
29 | + try |
|
30 | + { |
|
30 | 31 | throw new \Aimeos\MShop\Plugin\Provider\Exception( 'msg', 13, null, $this->codes ); |
31 | 32 | } |
32 | 33 | catch( \Aimeos\MShop\Plugin\Provider\Exception $mppe ) |
@@ -36,7 +37,8 @@ discard block |
||
36 | 37 | $this->assertEquals( $this->codes, $mppe->getErrorCodes() ); |
37 | 38 | } |
38 | 39 | |
39 | - try { |
|
40 | + try |
|
41 | + { |
|
40 | 42 | throw new \Aimeos\MShop\Plugin\Provider\Exception( 'msg2', 11 ); |
41 | 43 | } |
42 | 44 | catch( \Aimeos\MShop\Plugin\Provider\Exception $e ) |
@@ -672,7 +672,7 @@ |
||
672 | 672 | |
673 | 673 | try { |
674 | 674 | $stmt->execute()->finish(); |
675 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
675 | + } catch( \Aimeos\MW\DB\Exception $e ) {; } // Ignore duplicates |
|
676 | 676 | } |
677 | 677 | } |
678 | 678 | } |
@@ -682,9 +682,13 @@ |
||
682 | 682 | $stmt->bind( 4, $date ); // mtime |
683 | 683 | $stmt->bind( 5, $siteid ); |
684 | 684 | |
685 | - try { |
|
685 | + try |
|
686 | + { |
|
686 | 687 | $stmt->execute()->finish(); |
687 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
688 | + } |
|
689 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
690 | + { |
|
691 | +; } // Ignore duplicates |
|
688 | 692 | } |
689 | 693 | } |
690 | 694 | } |