@@ -173,7 +173,7 @@ |
||
173 | 173 | $manager = \Aimeos\MShop::create( $context, 'attribute' ); |
174 | 174 | $refItem = $manager->find( $refItem->getCode(), [], $domain, $refItem->getType() ); |
175 | 175 | } |
176 | - catch( \Aimeos\MShop\Exception $e ) { ; } // attribute doesn't exist yet |
|
176 | + catch( \Aimeos\MShop\Exception $e ) {; } // attribute doesn't exist yet |
|
177 | 177 | |
178 | 178 | $refItem = $this->addRefItems( $refItem, $data ); |
179 | 179 | $item->addListItem( 'attribute', $listItem, $refItem ); |
@@ -81,8 +81,7 @@ discard block |
||
81 | 81 | { |
82 | 82 | $this->addDemoData(); |
83 | 83 | $this->status( 'added' ); |
84 | - } |
|
85 | - else |
|
84 | + } else |
|
86 | 85 | { |
87 | 86 | $this->status( 'removed' ); |
88 | 87 | } |
@@ -173,7 +172,9 @@ discard block |
||
173 | 172 | $manager = \Aimeos\MShop::create( $context, 'attribute' ); |
174 | 173 | $refItem = $manager->find( $refItem->getCode(), [], $domain, $refItem->getType() ); |
175 | 174 | } |
176 | - catch( \Aimeos\MShop\Exception $e ) { ; } // attribute doesn't exist yet |
|
175 | + catch( \Aimeos\MShop\Exception $e ) |
|
176 | + { |
|
177 | +; } // attribute doesn't exist yet |
|
177 | 178 | |
178 | 179 | $refItem = $this->addRefItems( $refItem, $data ); |
179 | 180 | $item->addListItem( 'attribute', $listItem, $refItem ); |
@@ -349,7 +349,8 @@ |
||
349 | 349 | { |
350 | 350 | $stockManager->decrease( [$item->getProductId() => $how * -1 * $item->getQuantity()], $item->getStockType() ); |
351 | 351 | |
352 | - switch( $item->getType() ) { |
|
352 | + switch( $item->getType() ) |
|
353 | + { |
|
353 | 354 | case 'default': |
354 | 355 | $this->updateStockBundle( $item->getProductId(), $item->getStockType() ); break; |
355 | 356 | case 'select': |
@@ -140,8 +140,7 @@ |
||
140 | 140 | foreach( $cond->getExpressions() as $expr ) { |
141 | 141 | $list = array_merge( $list, $this->getProductIds( $expr ) ); |
142 | 142 | } |
143 | - } |
|
144 | - elseif( $cond instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) |
|
143 | + } elseif( $cond instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) |
|
145 | 144 | { |
146 | 145 | if( $cond->getName() === 'stock.productid' && $cond->getOperator() === '==' ) { |
147 | 146 | $list = array_merge( $list, (array) $cond->getValue() ); |
@@ -97,10 +97,14 @@ |
||
97 | 97 | $item->setPosition( $dataset['position'] ); |
98 | 98 | } |
99 | 99 | |
100 | - try { |
|
100 | + try |
|
101 | + { |
|
101 | 102 | $pluginManager->save( $item ); |
102 | 103 | $num++; |
103 | - } catch( \Exception $e ) {; } // if plugin configuration was already available |
|
104 | + } |
|
105 | + catch( \Exception $e ) |
|
106 | + { |
|
107 | +; } // if plugin configuration was already available |
|
104 | 108 | } |
105 | 109 | |
106 | 110 | $this->status( $num > 0 ? $num . '/' . $total : 'OK' ); |
@@ -81,7 +81,7 @@ |
||
81 | 81 | try { |
82 | 82 | $domainManager->save( $type ); |
83 | 83 | $num++; |
84 | - } catch( \Exception $e ) { ; } // if type was already available |
|
84 | + } catch( \Exception $e ) {; } // if type was already available |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | $this->status( $num > 0 ? $num . '/' . $total : 'OK' ); |
@@ -78,10 +78,14 @@ |
||
78 | 78 | $type->setLabel( $dataset['label'] ); |
79 | 79 | $type->setStatus( $dataset['status'] ); |
80 | 80 | |
81 | - try { |
|
81 | + try |
|
82 | + { |
|
82 | 83 | $domainManager->save( $type ); |
83 | 84 | $num++; |
84 | - } catch( \Exception $e ) { ; } // if type was already available |
|
85 | + } |
|
86 | + catch( \Exception $e ) |
|
87 | + { |
|
88 | +; } // if type was already available |
|
85 | 89 | } |
86 | 90 | |
87 | 91 | $this->status( $num > 0 ? $num . '/' . $total : 'OK' ); |
@@ -55,7 +55,7 @@ |
||
55 | 55 | $manager->save( $item ); |
56 | 56 | $num++; |
57 | 57 | } |
58 | - catch( \Exception $e ) { ; } // if attribute was already available |
|
58 | + catch( \Exception $e ) {; } // if attribute was already available |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | $this->status( $num > 0 ? $num . '/' . $total : 'OK' ); |
@@ -55,7 +55,9 @@ |
||
55 | 55 | $manager->save( $item ); |
56 | 56 | $num++; |
57 | 57 | } |
58 | - catch( \Exception $e ) { ; } // if attribute was already available |
|
58 | + catch( \Exception $e ) |
|
59 | + { |
|
60 | +; } // if attribute was already available |
|
59 | 61 | } |
60 | 62 | |
61 | 63 | $this->status( $num > 0 ? $num . '/' . $total : 'OK' ); |
@@ -173,9 +173,13 @@ |
||
173 | 173 | |
174 | 174 | foreach( $testdata[$domain] as $entry ) |
175 | 175 | { |
176 | - try { |
|
176 | + try |
|
177 | + { |
|
177 | 178 | $manager->save( $manager->create()->fromArray( $entry ), false ); |
178 | - } catch( \Exception $e ) {} // Duplicate entry |
|
179 | + } |
|
180 | + catch( \Exception $e ) |
|
181 | + { |
|
182 | +} // Duplicate entry |
|
179 | 183 | } |
180 | 184 | } |
181 | 185 | } |
@@ -142,9 +142,13 @@ |
||
142 | 142 | { |
143 | 143 | foreach( $data['customer/group'] as $entry ) |
144 | 144 | { |
145 | - try { |
|
145 | + try |
|
146 | + { |
|
146 | 147 | $groupManager->save( $groupManager->create()->fromArray( $entry ), false ); |
147 | - } catch( \Exception $e ) { echo $e->getMessage(); } // ignore duplicates |
|
148 | + } |
|
149 | + catch( \Exception $e ) |
|
150 | + { |
|
151 | +echo $e->getMessage(); } // ignore duplicates |
|
148 | 152 | } |
149 | 153 | } |
150 | 154 | } |
@@ -89,8 +89,7 @@ |
||
89 | 89 | |
90 | 90 | $attrManager->save( $item ); |
91 | 91 | $id = $item->getId(); |
92 | - } |
|
93 | - else |
|
92 | + } else |
|
94 | 93 | { |
95 | 94 | $id = $attrItem->getId(); |
96 | 95 | } |