@@ -334,7 +334,8 @@ |
||
| 334 | 334 | { |
| 335 | 335 | $stockManager->decrease( [$item->getProductCode() => $how * -1 * $item->getQuantity()], $item->getStockType() ); |
| 336 | 336 | |
| 337 | - switch( $item->getType() ) { |
|
| 337 | + switch( $item->getType() ) |
|
| 338 | + { |
|
| 338 | 339 | case 'default': |
| 339 | 340 | $this->updateStockBundle( $item->getProductId(), $item->getStockType() ); break; |
| 340 | 341 | case 'select': |
@@ -78,8 +78,7 @@ |
||
| 78 | 78 | { |
| 79 | 79 | $this->executeList( $stmtList ); |
| 80 | 80 | $this->status( 'done' ); |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $this->status( 'OK' ); |
| 85 | 84 | } |
@@ -100,8 +100,7 @@ discard block |
||
| 100 | 100 | $search->compare( '==', $prefix . '.lists.domain', $key ), |
| 101 | 101 | $search->compare( '==', $prefix . '.lists.type', $domain ), |
| 102 | 102 | ] ); |
| 103 | - } |
|
| 104 | - else |
|
| 103 | + } else |
|
| 105 | 104 | { |
| 106 | 105 | $list[] = $search->compare( '==', $prefix . '.lists.domain', $domain ); |
| 107 | 106 | } |
@@ -109,8 +108,7 @@ discard block |
||
| 109 | 108 | |
| 110 | 109 | $expr[] = $search->combine( '||', $list ); |
| 111 | 110 | $search->setConditions( $search->combine( '&&', $expr ) ); |
| 112 | - } |
|
| 113 | - else |
|
| 111 | + } else |
|
| 114 | 112 | { |
| 115 | 113 | $search->setConditions( $search->compare( '==', $prefix . '.lists.parentid', $ids ) ); |
| 116 | 114 | } |
@@ -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 | } |
@@ -217,9 +217,12 @@ discard block |
||
| 217 | 217 | ); |
| 218 | 218 | $dbm = $context->getDatabaseManager(); |
| 219 | 219 | |
| 220 | - try { |
|
| 220 | + try |
|
| 221 | + { |
|
| 221 | 222 | $this->object = \Aimeos\MW\Cache\Factory::create( $name, $config, $dbm ); |
| 222 | - } catch( \Exception $e ) { |
|
| 223 | + } |
|
| 224 | + catch( \Exception $e ) |
|
| 225 | + { |
|
| 223 | 226 | $this->object = \Aimeos\MW\Cache\Factory::create( 'DB', $config, $dbm ); |
| 224 | 227 | } |
| 225 | 228 | } |
@@ -288,9 +291,12 @@ discard block |
||
| 288 | 291 | */ |
| 289 | 292 | public function createItem( array $values = [] ) |
| 290 | 293 | { |
| 291 | - try { |
|
| 294 | + try |
|
| 295 | + { |
|
| 292 | 296 | $values['siteid'] = $this->getContext()->getLocale()->getSiteId(); |
| 293 | - } catch( \Exception $e ) { |
|
| 297 | + } |
|
| 298 | + catch( \Exception $e ) |
|
| 299 | + { |
|
| 294 | 300 | $values['siteid'] = null; |
| 295 | 301 | } |
| 296 | 302 | |
@@ -99,8 +99,7 @@ |
||
| 99 | 99 | } else { |
| 100 | 100 | unset( $services[$type][$key] ); |
| 101 | 101 | } |
| 102 | - } |
|
| 103 | - else |
|
| 102 | + } else |
|
| 104 | 103 | { |
| 105 | 104 | unset( $services[$type][$key] ); |
| 106 | 105 | } |
@@ -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 ); |
@@ -173,7 +173,7 @@ |
||
| 173 | 173 | $manager = \Aimeos\MShop::create( $context, 'attribute' ); |
| 174 | 174 | $refItem = $manager->findItem( $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->findItem( $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 ); |