@@ -117,8 +117,7 @@ |
||
| 117 | 117 | return false; |
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | - } |
|
| 121 | - elseif( ( $addresses = $basket->getAddress( Address\Base::TYPE_PAYMENT ) ) !== [] ) |
|
| 120 | + } elseif( ( $addresses = $basket->getAddress( Address\Base::TYPE_PAYMENT ) ) !== [] ) |
|
| 122 | 121 | { |
| 123 | 122 | // use billing address if no delivery address is available |
| 124 | 123 | foreach( $addresses as $address ) |
@@ -305,8 +305,7 @@ discard block |
||
| 305 | 305 | foreach( $columns as $name ) { |
| 306 | 306 | $names .= '"' . $name . '", '; $values .= '?, '; |
| 307 | 307 | } |
| 308 | - } |
|
| 309 | - else |
|
| 308 | + } else |
|
| 310 | 309 | { |
| 311 | 310 | foreach( $columns as $name ) { |
| 312 | 311 | $names .= '"' . $name . '" = ?, '; |
@@ -691,11 +690,9 @@ discard block |
||
| 691 | 690 | |
| 692 | 691 | if( isset( $attributes[$prefix] ) && $attributes[$prefix] instanceof $iface ) { |
| 693 | 692 | return $attributes[$prefix]->getInternalDeps(); |
| 694 | - } |
|
| 695 | - elseif( isset( $attributes[$name] ) && $attributes[$name] instanceof $iface ) { |
|
| 693 | + } elseif( isset( $attributes[$name] ) && $attributes[$name] instanceof $iface ) { |
|
| 696 | 694 | return $attributes[$name]->getInternalDeps(); |
| 697 | - } |
|
| 698 | - else if( isset( $attributes['id'] ) && $attributes['id'] instanceof $iface ) { |
|
| 695 | + } else if( isset( $attributes['id'] ) && $attributes['id'] instanceof $iface ) { |
|
| 699 | 696 | return $attributes['id']->getInternalDeps(); |
| 700 | 697 | } |
| 701 | 698 | |
@@ -110,7 +110,8 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | return array_pop( $this->connections[$name] ); |
| 112 | 112 | } |
| 113 | - catch( \PDOException $e ) { |
|
| 113 | + catch( \PDOException $e ) |
|
| 114 | + { |
|
| 114 | 115 | throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo ); |
| 115 | 116 | } |
| 116 | 117 | } |
@@ -160,14 +161,12 @@ discard block |
||
| 160 | 161 | { |
| 161 | 162 | $dsn .= 'Database=' . $dbase; |
| 162 | 163 | $dsn .= isset( $host ) ? ';Server=' . $host . ( isset( $port ) ? ',' . $port : '' ) : ''; |
| 163 | - } |
|
| 164 | - elseif( $sock == null ) |
|
| 164 | + } elseif( $sock == null ) |
|
| 165 | 165 | { |
| 166 | 166 | $dsn .= 'dbname=' . $dbase; |
| 167 | 167 | $dsn .= isset( $host ) ? ';host=' . $host : ''; |
| 168 | 168 | $dsn .= isset( $port ) ? ';port=' . $port : ''; |
| 169 | - } |
|
| 170 | - else |
|
| 169 | + } else |
|
| 171 | 170 | { |
| 172 | 171 | $dsn .= 'dbname=' . $dbase . ';unix_socket=' . $sock; |
| 173 | 172 | } |
@@ -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() ); |
@@ -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 | } |
@@ -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 | } |
@@ -139,8 +139,7 @@ |
||
| 139 | 139 | $list[] = $this->escape( '==', $this->getParamType( $item ), $item ); |
| 140 | 140 | } |
| 141 | 141 | $params[$i] = join( ',', $list ); |
| 142 | - } |
|
| 143 | - else |
|
| 142 | + } else |
|
| 144 | 143 | { |
| 145 | 144 | $params[$i] = $this->escape( '==', $this->getParamType( $params[$i] ), $params[$i] ); |
| 146 | 145 | } |
@@ -206,8 +206,7 @@ |
||
| 206 | 206 | */ |
| 207 | 207 | $path = 'madmin/job/manager/insert'; |
| 208 | 208 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
| 209 | - } |
|
| 210 | - else |
|
| 209 | + } else |
|
| 211 | 210 | { |
| 212 | 211 | /** madmin/job/manager/update/mysql |
| 213 | 212 | * Updates an existing job record in the database |
@@ -442,8 +442,7 @@ |
||
| 442 | 442 | */ |
| 443 | 443 | $path = 'mshop/price/manager/insert'; |
| 444 | 444 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
| 445 | - } |
|
| 446 | - else |
|
| 445 | + } else |
|
| 447 | 446 | { |
| 448 | 447 | /** mshop/price/manager/update/mysql |
| 449 | 448 | * Updates an existing price record in the database |