@@ -90,8 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | if( in_array( $op, $operators['combine'], true ) ) { |
92 | 92 | return $this->createCombineExpression( $op, (array) $value ); |
93 | - } |
|
94 | - else if( in_array( $op, $operators['compare'], true ) ) { |
|
93 | + } else if( in_array( $op, $operators['compare'], true ) ) { |
|
95 | 94 | return $this->createCompareExpression( $op, (array) $value ); |
96 | 95 | } |
97 | 96 | |
@@ -145,11 +144,9 @@ discard block |
||
145 | 144 | |
146 | 145 | if( in_array( $op, $operators['combine'] ) ) { |
147 | 146 | $results[] = $this->createCombineExpression( $op, (array) $entry[$op] ); |
148 | - } |
|
149 | - else if( in_array( $op, $operators['compare'] ) ) { |
|
147 | + } else if( in_array( $op, $operators['compare'] ) ) { |
|
150 | 148 | $results[] = $this->createCompareExpression( $op, (array) $entry[$op] ); |
151 | - } |
|
152 | - else { |
|
149 | + } else { |
|
153 | 150 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Invalid operator "%1$s"', $op ) ); |
154 | 151 | } |
155 | 152 | } |
@@ -98,8 +98,7 @@ |
||
98 | 98 | foreach( $products as $prodItem ) { // calculate bundled products |
99 | 99 | $sum += $qty * $prodItem->getQuantity(); |
100 | 100 | } |
101 | - } |
|
102 | - else |
|
101 | + } else |
|
103 | 102 | { |
104 | 103 | $sum += $qty; |
105 | 104 | } |
@@ -74,8 +74,7 @@ |
||
74 | 74 | $this->saveItems( $data ); |
75 | 75 | |
76 | 76 | $this->status( 'added' ); |
77 | - } |
|
78 | - else |
|
77 | + } else |
|
79 | 78 | { |
80 | 79 | $this->status( 'removed' ); |
81 | 80 | } |
@@ -76,8 +76,7 @@ |
||
76 | 76 | $this->release( $conn ); |
77 | 77 | |
78 | 78 | $this->status( 'done' ); |
79 | - } |
|
80 | - else |
|
79 | + } else |
|
81 | 80 | { |
82 | 81 | $this->status( 'OK' ); |
83 | 82 | } |
@@ -200,16 +200,13 @@ |
||
200 | 200 | } |
201 | 201 | |
202 | 202 | return \Aimeos\MW\DB\Statement\Base::PARAM_STR; |
203 | - } |
|
204 | - elseif( strpos( $item, '.' ) !== false ) |
|
203 | + } elseif( strpos( $item, '.' ) !== false ) |
|
205 | 204 | { |
206 | 205 | return \Aimeos\MW\DB\Statement\Base::PARAM_FLOAT; |
207 | - } |
|
208 | - elseif( ctype_digit( $item ) !== false ) |
|
206 | + } elseif( ctype_digit( $item ) !== false ) |
|
209 | 207 | { |
210 | 208 | return \Aimeos\MW\DB\Statement\Base::PARAM_INT; |
211 | - } |
|
212 | - elseif( $item === 'null' ) |
|
209 | + } elseif( $item === 'null' ) |
|
213 | 210 | { |
214 | 211 | return \Aimeos\MW\DB\Statement\Base::PARAM_NULL; |
215 | 212 | } |
@@ -137,8 +137,7 @@ |
||
137 | 137 | foreach( $cond->getExpressions() as $expr ) { |
138 | 138 | $list = array_merge( $list, $this->getProductCodes( $expr ) ); |
139 | 139 | } |
140 | - } |
|
141 | - elseif( $cond instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) |
|
140 | + } elseif( $cond instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface ) |
|
142 | 141 | { |
143 | 142 | if( $cond->getName() === 'stock.productcode' && $cond->getOperator() === '==' ) { |
144 | 143 | $list = array_merge( $list, (array) $cond->getValue() ); |
@@ -713,7 +713,7 @@ |
||
713 | 713 | |
714 | 714 | try { |
715 | 715 | $stmt->execute()->finish(); |
716 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
716 | + } catch( \Aimeos\MW\DB\Exception $e ) {; } // Ignore duplicates |
|
717 | 717 | } |
718 | 718 | } |
719 | 719 | } |
@@ -670,9 +670,13 @@ |
||
670 | 670 | $stmt->bind( 6, $date ); // mtime |
671 | 671 | $stmt->bind( 7, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
672 | 672 | |
673 | - try { |
|
673 | + try |
|
674 | + { |
|
674 | 675 | $stmt->execute()->finish(); |
675 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
676 | + } |
|
677 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
678 | + { |
|
679 | +; } // Ignore duplicates |
|
676 | 680 | } |
677 | 681 | } |
678 | 682 | } |
@@ -521,7 +521,7 @@ |
||
521 | 521 | |
522 | 522 | try { |
523 | 523 | $stmt->execute()->finish(); |
524 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
524 | + } catch( \Aimeos\MW\DB\Exception $e ) {; } // Ignore duplicates |
|
525 | 525 | } |
526 | 526 | } |
527 | 527 |
@@ -472,9 +472,13 @@ |
||
472 | 472 | $stmt->bind( 5, $date ); //mtime |
473 | 473 | $stmt->bind( 6, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
474 | 474 | |
475 | - try { |
|
475 | + try |
|
476 | + { |
|
476 | 477 | $stmt->execute()->finish(); |
477 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
478 | + } |
|
479 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
480 | + { |
|
481 | +; } // Ignore duplicates |
|
478 | 482 | } |
479 | 483 | } |
480 | 484 |
@@ -922,7 +922,7 @@ |
||
922 | 922 | |
923 | 923 | try { |
924 | 924 | $stmt->execute()->finish(); |
925 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
925 | + } catch( \Aimeos\MW\DB\Exception $e ) {; } // Ignore duplicates |
|
926 | 926 | } |
927 | 927 | |
928 | 928 |
@@ -745,9 +745,13 @@ |
||
745 | 745 | $stmt->bind( 6, $date ); //mtime |
746 | 746 | $stmt->bind( 7, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
747 | 747 | |
748 | - try { |
|
748 | + try |
|
749 | + { |
|
749 | 750 | $stmt->execute()->finish(); |
750 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
751 | + } |
|
752 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
753 | + { |
|
754 | +; } // Ignore duplicates |
|
751 | 755 | } |
752 | 756 | |
753 | 757 |