@@ -112,9 +112,12 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function create( array $values = [] ) : \Aimeos\MShop\Common\Item\Iface |
114 | 114 | { |
115 | - try { |
|
115 | + try |
|
116 | + { |
|
116 | 117 | $values['locale.currency.siteid'] = $this->context()->locale()->getSiteId(); |
117 | - } catch( \Exception $e ) { |
|
118 | + } |
|
119 | + catch( \Exception $e ) |
|
120 | + { |
|
118 | 121 | $values['locale.currency.siteid'] = null; |
119 | 122 | } |
120 | 123 | |
@@ -176,8 +179,7 @@ discard block |
||
176 | 179 | */ |
177 | 180 | $path = 'mshop/locale/manager/currency/insert'; |
178 | 181 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
179 | - } |
|
180 | - else |
|
182 | + } else |
|
181 | 183 | { |
182 | 184 | /** mshop/locale/manager/currency/update/mysql |
183 | 185 | * Updates an existing currency record in the database |
@@ -357,8 +357,7 @@ |
||
357 | 357 | */ |
358 | 358 | $path = 'mshop/text/manager/insert'; |
359 | 359 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
360 | - } |
|
361 | - else |
|
360 | + } else |
|
362 | 361 | { |
363 | 362 | /** mshop/text/manager/update/mysql |
364 | 363 | * Updates an existing text record in the database |
@@ -515,8 +515,7 @@ |
||
515 | 515 | */ |
516 | 516 | $path = 'mshop/media/manager/insert'; |
517 | 517 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
518 | - } |
|
519 | - else |
|
518 | + } else |
|
520 | 519 | { |
521 | 520 | /** mshop/media/manager/update/mysql |
522 | 521 | * Updates an existing media record in the database |
@@ -619,8 +619,7 @@ |
||
619 | 619 | */ |
620 | 620 | $path = 'mshop/customer/manager/insert'; |
621 | 621 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
622 | - } |
|
623 | - else |
|
622 | + } else |
|
624 | 623 | { |
625 | 624 | /** mshop/customer/manager/update/mysql |
626 | 625 | * Updates an existing customer record in the database |
@@ -455,8 +455,7 @@ |
||
455 | 455 | */ |
456 | 456 | $path = 'mshop/supplier/manager/insert'; |
457 | 457 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
458 | - } |
|
459 | - else |
|
458 | + } else |
|
460 | 459 | { |
461 | 460 | /** mshop/supplier/manager/update/mysql |
462 | 461 | * Updates an existing supplier record in the database |
@@ -428,8 +428,7 @@ |
||
428 | 428 | */ |
429 | 429 | $path = 'mshop/review/manager/insert'; |
430 | 430 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
431 | - } |
|
432 | - else |
|
431 | + } else |
|
433 | 432 | { |
434 | 433 | /** mshop/review/manager/update/mysql |
435 | 434 | * Updates an existing review record in the database |
@@ -385,8 +385,7 @@ |
||
385 | 385 | */ |
386 | 386 | $path = 'mshop/coupon/manager/insert'; |
387 | 387 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
388 | - } |
|
389 | - else |
|
388 | + } else |
|
390 | 389 | { |
391 | 390 | /** mshop/coupon/manager/update/mysql |
392 | 391 | * Updates an existing coupon record in the database |
@@ -478,8 +478,7 @@ |
||
478 | 478 | */ |
479 | 479 | $path = 'mshop/attribute/manager/insert'; |
480 | 480 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
481 | - } |
|
482 | - else |
|
481 | + } else |
|
483 | 482 | { |
484 | 483 | /** mshop/attribute/manager/update/mysql |
485 | 484 | * Updates an existing attribute record in the database |
@@ -799,9 +799,12 @@ discard block |
||
799 | 799 | |
800 | 800 | foreach( $sitePath as $siteId ) |
801 | 801 | { |
802 | - try { |
|
802 | + try |
|
803 | + { |
|
803 | 804 | $path = $this->createTreeManager( $siteId )->getPath( $id ); |
804 | - } catch( \Exception $e ) { |
|
805 | + } |
|
806 | + catch( \Exception $e ) |
|
807 | + { |
|
805 | 808 | continue; |
806 | 809 | } |
807 | 810 | |
@@ -845,9 +848,12 @@ discard block |
||
845 | 848 | |
846 | 849 | foreach( $sitePath as $siteId ) |
847 | 850 | { |
848 | - try { |
|
851 | + try |
|
852 | + { |
|
849 | 853 | $node = $this->createTreeManager( $siteId )->getNode( $id, $level, $criteria ); |
850 | - } catch( \Aimeos\MW\Tree\Exception $e ) { |
|
854 | + } |
|
855 | + catch( \Aimeos\MW\Tree\Exception $e ) |
|
856 | + { |
|
851 | 857 | continue; |
852 | 858 | } |
853 | 859 | |
@@ -929,8 +935,7 @@ discard block |
||
929 | 935 | if( $child->getParentId() !== $item->getParentId() ) { |
930 | 936 | $this->move( $child->getId(), $item->getParentId(), $child->getParentId() ); |
931 | 937 | } |
932 | - } |
|
933 | - else |
|
938 | + } else |
|
934 | 939 | { |
935 | 940 | $this->insert( $child, $item->getId() ); |
936 | 941 | } |
@@ -1076,8 +1081,7 @@ discard block |
||
1076 | 1081 | */ |
1077 | 1082 | $path = 'mshop/catalog/manager/update-usage'; |
1078 | 1083 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ), false ); |
1079 | - } |
|
1080 | - else |
|
1084 | + } else |
|
1081 | 1085 | { |
1082 | 1086 | /** mshop/catalog/manager/insert-usage/mysql |
1083 | 1087 | * Updates the config, editor, ctime and mtime value of an inserted record |
@@ -1141,8 +1145,7 @@ discard block |
||
1141 | 1145 | { |
1142 | 1146 | $stmt->bind( $idx++, $siteid ); |
1143 | 1147 | $stmt->bind( $idx++, $id, \Aimeos\Base\DB\Statement\Base::PARAM_INT ); |
1144 | - } |
|
1145 | - else |
|
1148 | + } else |
|
1146 | 1149 | { |
1147 | 1150 | $stmt->bind( $idx++, $date ); // ctime |
1148 | 1151 | $stmt->bind( $idx++, $siteid ); |