@@ -71,8 +71,7 @@ |
||
| 71 | 71 | { |
| 72 | 72 | $this->execute( $stmt ); |
| 73 | 73 | $this->status( 'done' ); |
| 74 | - } |
|
| 75 | - else |
|
| 74 | + } else |
|
| 76 | 75 | { |
| 77 | 76 | $this->status( 'OK' ); |
| 78 | 77 | } |
@@ -115,10 +115,14 @@ |
||
| 115 | 115 | $item->setPosition( $dataset['position'] ); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - try { |
|
| 118 | + try |
|
| 119 | + { |
|
| 119 | 120 | $pluginManager->saveItem( $item ); |
| 120 | 121 | $num++; |
| 121 | - } catch( \Exception $e ) {; } // if plugin configuration was already available |
|
| 122 | + } |
|
| 123 | + catch( \Exception $e ) |
|
| 124 | + { |
|
| 125 | +; } // if plugin configuration was already available |
|
| 122 | 126 | } |
| 123 | 127 | |
| 124 | 128 | $this->status( $num > 0 ? $num . '/' . $total : 'OK' ); |
@@ -80,8 +80,7 @@ |
||
| 80 | 80 | { |
| 81 | 81 | $this->executeList( $stmts ); |
| 82 | 82 | $this->status( 'done' ); |
| 83 | - } |
|
| 84 | - else |
|
| 83 | + } else |
|
| 85 | 84 | { |
| 86 | 85 | $this->status( 'OK' ); |
| 87 | 86 | } |
@@ -89,8 +89,7 @@ |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $this->status( 'added' ); |
| 92 | - } |
|
| 93 | - else |
|
| 92 | + } else |
|
| 94 | 93 | { |
| 95 | 94 | $this->status( 'removed' ); |
| 96 | 95 | } |
@@ -75,8 +75,7 @@ |
||
| 75 | 75 | $this->saveCustomerItems( $data ); |
| 76 | 76 | |
| 77 | 77 | $this->status( 'added' ); |
| 78 | - } |
|
| 79 | - else |
|
| 78 | + } else |
|
| 80 | 79 | { |
| 81 | 80 | $this->status( 'removed' ); |
| 82 | 81 | } |
@@ -185,12 +185,10 @@ |
||
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | return 'string'; |
| 188 | - } |
|
| 189 | - else if( strpos( $item, '.' ) !== false ) |
|
| 188 | + } else if( strpos( $item, '.' ) !== false ) |
|
| 190 | 189 | { |
| 191 | 190 | return 'float'; |
| 192 | - } |
|
| 193 | - else if( ctype_digit( $item ) !== false ) |
|
| 191 | + } else if( ctype_digit( $item ) !== false ) |
|
| 194 | 192 | { |
| 195 | 193 | return 'int'; |
| 196 | 194 | } |
@@ -143,12 +143,10 @@ |
||
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | return '(string)'; |
| 146 | - } |
|
| 147 | - else if( strpos( $item, '.' ) !== false ) |
|
| 146 | + } else if( strpos( $item, '.' ) !== false ) |
|
| 148 | 147 | { |
| 149 | 148 | return '(float)'; |
| 150 | - } |
|
| 151 | - else if( ctype_digit( $item ) !== false ) |
|
| 149 | + } else if( ctype_digit( $item ) !== false ) |
|
| 152 | 150 | { |
| 153 | 151 | return '(int)'; |
| 154 | 152 | } |
@@ -65,15 +65,13 @@ |
||
| 65 | 65 | { |
| 66 | 66 | $options[$name] = (array) $options[$name]; |
| 67 | 67 | $options[$name][] = substr( $option, $pos + 1 ); |
| 68 | - } |
|
| 69 | - else |
|
| 68 | + } else |
|
| 70 | 69 | { |
| 71 | 70 | $options[$name] = substr( $option, $pos + 1 ); |
| 72 | 71 | } |
| 73 | 72 | |
| 74 | 73 | unset( $params[$key] ); |
| 75 | - } |
|
| 76 | - else |
|
| 74 | + } else |
|
| 77 | 75 | { |
| 78 | 76 | printf( "Invalid option \"%1\$s\"\n", $option ); |
| 79 | 77 | usage(); |
@@ -201,8 +201,7 @@ discard block |
||
| 201 | 201 | if( $level === \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE ) { |
| 202 | 202 | return $node; |
| 203 | 203 | } |
| 204 | - } |
|
| 205 | - else |
|
| 204 | + } else |
|
| 206 | 205 | { |
| 207 | 206 | $node = $this->getNodeById( $id ); |
| 208 | 207 | |
@@ -276,15 +275,13 @@ discard block |
||
| 276 | 275 | $node->left = $refNode->left; |
| 277 | 276 | $node->right = $refNode->left + 1; |
| 278 | 277 | $node->level = $refNode->level; |
| 279 | - } |
|
| 280 | - else if( $parentId !== null ) |
|
| 278 | + } else if( $parentId !== null ) |
|
| 281 | 279 | { |
| 282 | 280 | $parentNode = $this->getNode( $parentId, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE ); |
| 283 | 281 | $node->left = $parentNode->right; |
| 284 | 282 | $node->right = $parentNode->right + 1; |
| 285 | 283 | $node->level = $parentNode->level + 1; |
| 286 | - } |
|
| 287 | - else |
|
| 284 | + } else |
|
| 288 | 285 | { |
| 289 | 286 | $node->left = 1; |
| 290 | 287 | $node->right = 2; |
@@ -375,8 +372,7 @@ discard block |
||
| 375 | 372 | $moveNodeRightBegin = $node->left + $diff + 1; |
| 376 | 373 | $moveNodeRightEnd = $node->right + $diff; |
| 377 | 374 | $movesize = $refNode->left - $node->left - $diff; |
| 378 | - } |
|
| 379 | - else |
|
| 375 | + } else |
|
| 380 | 376 | { |
| 381 | 377 | $moveNodeLeftBegin = $node->left; |
| 382 | 378 | $moveNodeLeftEnd = $node->right - 1; |
@@ -387,8 +383,7 @@ discard block |
||
| 387 | 383 | |
| 388 | 384 | $closeNodeLeftBegin = $node->left + $diff; |
| 389 | 385 | $closeNodeRightBegin = $node->left + $diff; |
| 390 | - } |
|
| 391 | - else |
|
| 386 | + } else |
|
| 392 | 387 | { |
| 393 | 388 | $refNode = $this->getNode( $newParentId, \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE ); |
| 394 | 389 | |
@@ -414,8 +409,7 @@ discard block |
||
| 414 | 409 | $moveNodeRightBegin = $node->left + $diff + 1; |
| 415 | 410 | $moveNodeRightEnd = $node->right + $diff; |
| 416 | 411 | $movesize = $refNode->right - $node->left - $diff; |
| 417 | - } |
|
| 418 | - else |
|
| 412 | + } else |
|
| 419 | 413 | { |
| 420 | 414 | $moveNodeLeftBegin = $node->left; |
| 421 | 415 | $moveNodeLeftEnd = $node->right - 1; |