@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | * Returns the search results for the given SQL statement. |
606 | 606 | * |
607 | 607 | * @param \Aimeos\MW\DB\Connection\Iface $conn Database connection |
608 | - * @param $sql SQL statement |
|
608 | + * @param string $sql SQL statement |
|
609 | 609 | * @return \Aimeos\MW\DB\Result\Iface Search result object |
610 | 610 | */ |
611 | 611 | protected function getSearchResults( \Aimeos\MW\DB\Connection\Iface $conn, $sql ) |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | * Returns the total number of items found for the conditions |
636 | 636 | * |
637 | 637 | * @param \Aimeos\MW\DB\Connection\Iface $conn Database connection |
638 | - * @param array $find List of markers that should be replaced in the SQL statement |
|
638 | + * @param string[] $find List of markers that should be replaced in the SQL statement |
|
639 | 639 | * @param array $replace List of replacements for the markers in the SQL statement |
640 | 640 | * @throws \Aimeos\MShop\Locale\Exception If no total value was found |
641 | 641 | * @return integer Total number of found items |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | $replace = array( |
370 | 370 | $search->getConditionString( $types, $translations ), |
371 | 371 | $search->getSortationString( $types, $translations ), |
372 | - ( $columns ? ', ' . $columns : '' ), |
|
372 | + ( $columns ? ', '.$columns : '' ), |
|
373 | 373 | $search->getSliceStart(), |
374 | 374 | $search->getSliceSize(), |
375 | 375 | ); |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | * @see mshop/locale/manager/currency/decorators/global |
582 | 582 | */ |
583 | 583 | |
584 | - return $this->getSubManagerBase( 'locale', 'currency/' . $manager, $name ); |
|
584 | + return $this->getSubManagerBase( 'locale', 'currency/'.$manager, $name ); |
|
585 | 585 | } |
586 | 586 | |
587 | 587 | |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | protected function getSearchResults( \Aimeos\MW\DB\Connection\Iface $conn, $sql ) |
612 | 612 | { |
613 | 613 | $statement = $conn->create( $sql ); |
614 | - $this->getContext()->getLogger()->log( __METHOD__ . ': SQL statement: ' . $statement, \Aimeos\MW\Logger\Base::DEBUG ); |
|
614 | + $this->getContext()->getLogger()->log( __METHOD__.': SQL statement: '.$statement, \Aimeos\MW\Logger\Base::DEBUG ); |
|
615 | 615 | |
616 | 616 | $results = $statement->execute(); |
617 | 617 |
@@ -105,9 +105,12 @@ discard block |
||
105 | 105 | */ |
106 | 106 | public function createItem() |
107 | 107 | { |
108 | - try { |
|
108 | + try |
|
109 | + { |
|
109 | 110 | $values = array( 'locale.currency.siteid' => $this->getContext()->getLocale()->getSiteId() ); |
110 | - } catch( \Exception $ex ) { |
|
111 | + } |
|
112 | + catch( \Exception $ex ) |
|
113 | + { |
|
111 | 114 | $values = array( 'locale.currency.siteid' => null ); |
112 | 115 | } |
113 | 116 | |
@@ -177,8 +180,7 @@ discard block |
||
177 | 180 | * @see mshop/locale/manager/currency/standard/count/ansi |
178 | 181 | */ |
179 | 182 | $path = 'mshop/locale/manager/currency/standard/insert'; |
180 | - } |
|
181 | - else |
|
183 | + } else |
|
182 | 184 | { |
183 | 185 | /** mshop/locale/manager/currency/standard/update/mysql |
184 | 186 | * Updates an existing currency record in the database |
@@ -55,9 +55,12 @@ discard block |
||
55 | 55 | $config = $this->getItemBase()->getConfig(); |
56 | 56 | if( !isset( $config['threshold'] ) ) { return true; } |
57 | 57 | |
58 | - try { |
|
58 | + try |
|
59 | + { |
|
59 | 60 | $delivery = $order->getService( 'delivery' ); |
60 | - } catch( \Aimeos\MShop\Order\Exception $oe ) { |
|
61 | + } |
|
62 | + catch( \Aimeos\MShop\Order\Exception $oe ) |
|
63 | + { |
|
61 | 64 | // no delivery item available yet |
62 | 65 | return true; |
63 | 66 | } |
@@ -94,8 +97,7 @@ discard block |
||
94 | 97 | { |
95 | 98 | $price->setRebate( $price->getCosts() ); |
96 | 99 | $price->setCosts( '0.00' ); |
97 | - } |
|
98 | - else if( $sum->getValue() + $sum->getRebate() < $threshold[$currency] && $price->getRebate() > '0.00' ) |
|
100 | + } else if( $sum->getValue() + $sum->getRebate() < $threshold[$currency] && $price->getRebate() > '0.00' ) |
|
99 | 101 | { |
100 | 102 | $price->setCosts( $price->getRebate() ); |
101 | 103 | $price->setRebate( '0.00' ); |
@@ -402,7 +402,7 @@ discard block |
||
402 | 402 | * @see mshop/index/manager/price/decorators/global |
403 | 403 | */ |
404 | 404 | |
405 | - return $this->getSubManagerBase( 'index', 'price/' . $manager, $name ); |
|
405 | + return $this->getSubManagerBase( 'index', 'price/'.$manager, $name ); |
|
406 | 406 | } |
407 | 407 | |
408 | 408 | |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | |
734 | 734 | try { |
735 | 735 | $stmt->execute()->finish(); |
736 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
736 | + } catch( \Aimeos\MW\DB\Exception $e ) {; } // Ignore duplicates |
|
737 | 737 | } |
738 | 738 | } |
739 | 739 | } |
@@ -731,9 +731,13 @@ |
||
731 | 731 | $stmt->bind( 13, $editor ); |
732 | 732 | $stmt->bind( 14, $date ); //ctime |
733 | 733 | |
734 | - try { |
|
734 | + try |
|
735 | + { |
|
735 | 736 | $stmt->execute()->finish(); |
736 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
737 | + } |
|
738 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
739 | + { |
|
740 | +; } // Ignore duplicates |
|
737 | 741 | } |
738 | 742 | } |
739 | 743 | } |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | * @see mshop/index/manager/attribute/decorators/global |
359 | 359 | */ |
360 | 360 | |
361 | - return $this->getSubManagerBase( 'index', 'attribute/' . $manager, $name ); |
|
361 | + return $this->getSubManagerBase( 'index', 'attribute/'.$manager, $name ); |
|
362 | 362 | } |
363 | 363 | |
364 | 364 | |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | |
684 | 684 | try { |
685 | 685 | $stmt->execute()->finish(); |
686 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
686 | + } catch( \Aimeos\MW\DB\Exception $e ) {; } // Ignore duplicates |
|
687 | 687 | } |
688 | 688 | } |
689 | 689 | } |
@@ -681,9 +681,13 @@ |
||
681 | 681 | $stmt->bind( 8, $editor ); |
682 | 682 | $stmt->bind( 9, $date ); // ctime |
683 | 683 | |
684 | - try { |
|
684 | + try |
|
685 | + { |
|
685 | 686 | $stmt->execute()->finish(); |
686 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
687 | + } |
|
688 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
689 | + { |
|
690 | +; } // Ignore duplicates |
|
687 | 691 | } |
688 | 692 | } |
689 | 693 | } |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | * @see mshop/locale/manager/language/decorators/global |
455 | 455 | */ |
456 | 456 | |
457 | - return $this->getSubManagerBase( 'locale', 'language/' . $manager, $name ); |
|
457 | + return $this->getSubManagerBase( 'locale', 'language/'.$manager, $name ); |
|
458 | 458 | } |
459 | 459 | |
460 | 460 | |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | $replace = array( |
487 | 487 | $search->getConditionString( $types, $translations ), |
488 | 488 | $search->getSortationString( $types, $translations ), |
489 | - ( $columns ? ', ' . $columns : '' ), |
|
489 | + ( $columns ? ', '.$columns : '' ), |
|
490 | 490 | $search->getSliceStart(), |
491 | 491 | $search->getSliceSize(), |
492 | 492 | ); |
@@ -606,7 +606,7 @@ discard block |
||
606 | 606 | protected function getSearchResults( \Aimeos\MW\DB\Connection\Iface $conn, $sql ) |
607 | 607 | { |
608 | 608 | $statement = $conn->create( $sql ); |
609 | - $this->getContext()->getLogger()->log( __METHOD__ . ': SQL statement: ' . $statement, \Aimeos\MW\Logger\Base::DEBUG ); |
|
609 | + $this->getContext()->getLogger()->log( __METHOD__.': SQL statement: '.$statement, \Aimeos\MW\Logger\Base::DEBUG ); |
|
610 | 610 | |
611 | 611 | $results = $statement->execute(); |
612 | 612 |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | * Returns the search results for the given SQL statement. |
606 | 606 | * |
607 | 607 | * @param \Aimeos\MW\DB\Connection\Iface $conn Database connection |
608 | - * @param $sql SQL statement |
|
608 | + * @param string $sql SQL statement |
|
609 | 609 | * @return \Aimeos\MW\DB\Result\Iface Search result object |
610 | 610 | */ |
611 | 611 | protected function getSearchResults( \Aimeos\MW\DB\Connection\Iface $conn, $sql ) |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | * Returns the total number of items found for the conditions |
636 | 636 | * |
637 | 637 | * @param \Aimeos\MW\DB\Connection\Iface $conn Database connection |
638 | - * @param array $find List of markers that should be replaced in the SQL statement |
|
638 | + * @param string[] $find List of markers that should be replaced in the SQL statement |
|
639 | 639 | * @param array $replace List of replacements for the markers in the SQL statement |
640 | 640 | * @throws \Aimeos\MShop\Locale\Exception If no total value was found |
641 | 641 | * @return integer Total number of found items |
@@ -104,9 +104,12 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function createItem() |
106 | 106 | { |
107 | - try { |
|
107 | + try |
|
108 | + { |
|
108 | 109 | $values = array( 'locale.language.siteid' => $this->getContext()->getLocale()->getSiteId() ); |
109 | - } catch( \Exception $ex ) { |
|
110 | + } |
|
111 | + catch( \Exception $ex ) |
|
112 | + { |
|
110 | 113 | $values = array( 'locale.language.siteid' => null ); |
111 | 114 | } |
112 | 115 | |
@@ -173,8 +176,7 @@ discard block |
||
173 | 176 | * @see mshop/locale/manager/language/standard/count/ansi |
174 | 177 | */ |
175 | 178 | $path = 'mshop/locale/manager/language/standard/insert'; |
176 | - } |
|
177 | - else |
|
179 | + } else |
|
178 | 180 | { |
179 | 181 | /** mshop/locale/manager/language/standard/update/mysql |
180 | 182 | * Updates an existing language record in the database |
@@ -267,8 +267,7 @@ discard block |
||
267 | 267 | $quantity = $item->getQuantity(); |
268 | 268 | $item = $this->products[$pos]; |
269 | 269 | $item->setQuantity( $item->getQuantity() + $quantity ); |
270 | - } |
|
271 | - else if( $position !== null ) |
|
270 | + } else if( $position !== null ) |
|
272 | 271 | { |
273 | 272 | if( isset( $this->products[$position] ) ) |
274 | 273 | { |
@@ -285,15 +284,13 @@ discard block |
||
285 | 284 | |
286 | 285 | $products[$position] = $item; |
287 | 286 | $this->products = $products; |
288 | - } |
|
289 | - else |
|
287 | + } else |
|
290 | 288 | { |
291 | 289 | $this->products[$position] = $item; |
292 | 290 | } |
293 | 291 | |
294 | 292 | $pos = $position; |
295 | - } |
|
296 | - else |
|
293 | + } else |
|
297 | 294 | { |
298 | 295 | $this->products[] = $item; |
299 | 296 | end( $this->products ); |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | * @see mshop/index/manager/catalog/decorators/global |
367 | 367 | */ |
368 | 368 | |
369 | - return $this->getSubManagerBase( 'index', 'catalog/' . $manager, $name ); |
|
369 | + return $this->getSubManagerBase( 'index', 'catalog/'.$manager, $name ); |
|
370 | 370 | } |
371 | 371 | |
372 | 372 | |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | |
486 | 486 | try { |
487 | 487 | $stmt->execute()->finish(); |
488 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
488 | + } catch( \Aimeos\MW\DB\Exception $e ) {; } // Ignore duplicates |
|
489 | 489 | } |
490 | 490 | } |
491 | 491 |
@@ -483,9 +483,13 @@ |
||
483 | 483 | $stmt->bind( 7, $editor ); |
484 | 484 | $stmt->bind( 8, $date ); //ctime |
485 | 485 | |
486 | - try { |
|
486 | + try |
|
487 | + { |
|
487 | 488 | $stmt->execute()->finish(); |
488 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
489 | + } |
|
490 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
491 | + { |
|
492 | +; } // Ignore duplicates |
|
489 | 493 | } |
490 | 494 | } |
491 | 495 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $ds = DIRECTORY_SEPARATOR; |
53 | 53 | $this->additional->setEditor( 'core:unittest' ); |
54 | 54 | |
55 | - $this->process( __DIR__ . $ds . 'data' . $ds . 'customer.php' ); |
|
55 | + $this->process( __DIR__.$ds.'data'.$ds.'customer.php' ); |
|
56 | 56 | |
57 | 57 | $this->status( 'done' ); |
58 | 58 | |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | |
208 | 208 | try { |
209 | 209 | $customerGroupManager->saveItem( $group, false ); |
210 | - } catch( \Exception $e ) { ; } // ignore duplicates |
|
210 | + } catch( \Exception $e ) {; } // ignore duplicates |
|
211 | 211 | } |
212 | 212 | } |
213 | 213 | } |
214 | 214 | \ No newline at end of file |
@@ -205,9 +205,13 @@ |
||
205 | 205 | $group->setCode( $dataset['code'] ); |
206 | 206 | $group->setLabel( $dataset['label'] ); |
207 | 207 | |
208 | - try { |
|
208 | + try |
|
209 | + { |
|
209 | 210 | $customerGroupManager->saveItem( $group, false ); |
210 | - } catch( \Exception $e ) { ; } // ignore duplicates |
|
211 | + } |
|
212 | + catch( \Exception $e ) |
|
213 | + { |
|
214 | +; } // ignore duplicates |
|
211 | 215 | } |
212 | 216 | } |
213 | 217 | } |
214 | 218 | \ No newline at end of file |
@@ -46,13 +46,13 @@ |
||
46 | 46 | |
47 | 47 | $ds = DIRECTORY_SEPARATOR; |
48 | 48 | |
49 | - $this->setupPlatform( 'db-index', 'mysql', realpath( __DIR__ ) . $ds . 'default' . $ds . 'schema' . $ds . 'index-mysql.sql' ); |
|
50 | - $this->setupPlatform( 'db-order', 'mysql', realpath( __DIR__ ) . $ds . 'default' . $ds . 'schema' . $ds . 'order-mysql.sql' ); |
|
51 | - $this->setupPlatform( 'db-text', 'mysql', realpath( __DIR__ ) . $ds . 'default' . $ds . 'schema' . $ds . 'text-mysql.sql' ); |
|
49 | + $this->setupPlatform( 'db-index', 'mysql', realpath( __DIR__ ).$ds.'default'.$ds.'schema'.$ds.'index-mysql.sql' ); |
|
50 | + $this->setupPlatform( 'db-order', 'mysql', realpath( __DIR__ ).$ds.'default'.$ds.'schema'.$ds.'order-mysql.sql' ); |
|
51 | + $this->setupPlatform( 'db-text', 'mysql', realpath( __DIR__ ).$ds.'default'.$ds.'schema'.$ds.'text-mysql.sql' ); |
|
52 | 52 | |
53 | - $this->setupPlatform( 'db-index', 'pgsql', realpath( __DIR__ ) . $ds . 'default' . $ds . 'schema' . $ds . 'index-pgsql.sql' ); |
|
54 | - $this->setupPlatform( 'db-order', 'pgsql', realpath( __DIR__ ) . $ds . 'default' . $ds . 'schema' . $ds . 'order-pgsql.sql' ); |
|
55 | - $this->setupPlatform( 'db-text', 'pgsql', realpath( __DIR__ ) . $ds . 'default' . $ds . 'schema' . $ds . 'text-pgsql.sql' ); |
|
53 | + $this->setupPlatform( 'db-index', 'pgsql', realpath( __DIR__ ).$ds.'default'.$ds.'schema'.$ds.'index-pgsql.sql' ); |
|
54 | + $this->setupPlatform( 'db-order', 'pgsql', realpath( __DIR__ ).$ds.'default'.$ds.'schema'.$ds.'order-pgsql.sql' ); |
|
55 | + $this->setupPlatform( 'db-text', 'pgsql', realpath( __DIR__ ).$ds.'default'.$ds.'schema'.$ds.'text-pgsql.sql' ); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 |