@@ -63,8 +63,7 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | $cntl->store(); |
| 66 | - } |
|
| 67 | - else |
|
| 66 | + } else |
|
| 68 | 67 | { |
| 69 | 68 | if( ( $item = $items->get( $relId ) ) !== null ) { |
| 70 | 69 | $cntl->deletePropertyItem( $item )->store(); |
@@ -113,8 +112,7 @@ discard block |
||
| 113 | 112 | { |
| 114 | 113 | $view->items = $items; |
| 115 | 114 | $view->total = count( $items ); |
| 116 | - } |
|
| 117 | - else |
|
| 115 | + } else |
|
| 118 | 116 | { |
| 119 | 117 | $view->items = $items->get( $relId ); |
| 120 | 118 | $view->total = $items->isEmpty() ? 0 : 1; |
@@ -63,8 +63,7 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | $cntl->store(); |
| 66 | - } |
|
| 67 | - else |
|
| 66 | + } else |
|
| 68 | 67 | { |
| 69 | 68 | if( ( $item = $items->get( $relId ) ) !== null ) { |
| 70 | 69 | $cntl->deleteAddressItem( $item )->store(); |
@@ -113,8 +112,7 @@ discard block |
||
| 113 | 112 | { |
| 114 | 113 | $view->items = $item->getAddressItems(); |
| 115 | 114 | $view->total = count( $view->items ); |
| 116 | - } |
|
| 117 | - else |
|
| 115 | + } else |
|
| 118 | 116 | { |
| 119 | 117 | $view->items = $item->getAddressItem( $relId ); |
| 120 | 118 | $view->total = empty( $view->items ) ? 0 : 1; |
@@ -27,8 +27,7 @@ discard block |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | |
| 30 | -$entryFcn = function( \Aimeos\MShop\Common\Item\Lists\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 31 | -{ |
|
| 30 | +$entryFcn = function( \Aimeos\MShop\Common\Item\Lists\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 32 | 31 | $relid = $item->getId(); |
| 33 | 32 | $id = $item->getParentId(); |
| 34 | 33 | $attributes = $item->toArray(); |
@@ -86,8 +85,7 @@ discard block |
||
| 86 | 85 | foreach( $items as $item ) { |
| 87 | 86 | $data[] = $entryFcn( $item ); |
| 88 | 87 | } |
| 89 | - } |
|
| 90 | - else |
|
| 88 | + } else |
|
| 91 | 89 | { |
| 92 | 90 | $data = $entryFcn( $items ); |
| 93 | 91 | } |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | |
| 29 | -$entryFcn = function( \Aimeos\MShop\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 30 | -{ |
|
| 29 | +$entryFcn = function( \Aimeos\MShop\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 31 | 30 | $id = $item->getId(); |
| 32 | 31 | $attributes = $item->toArray(); |
| 33 | 32 | $type = $item->getResourceType(); |
@@ -85,8 +84,7 @@ discard block |
||
| 85 | 84 | foreach( $items as $item ) { |
| 86 | 85 | $data[] = $entryFcn( $item ); |
| 87 | 86 | } |
| 88 | - } |
|
| 89 | - else |
|
| 87 | + } else |
|
| 90 | 88 | { |
| 91 | 89 | $data = $entryFcn( $items ); |
| 92 | 90 | } |
@@ -27,8 +27,7 @@ discard block |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | |
| 30 | -$entryFcn = function( \Aimeos\MShop\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 31 | -{ |
|
| 30 | +$entryFcn = function( \Aimeos\MShop\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 32 | 31 | $relid = $item->getId(); |
| 33 | 32 | $type = 'review'; |
| 34 | 33 | $attributes = $item->toArray(); |
@@ -86,8 +85,7 @@ discard block |
||
| 86 | 85 | foreach( $items as $item ) { |
| 87 | 86 | $data[] = $entryFcn( $item ); |
| 88 | 87 | } |
| 89 | - } |
|
| 90 | - else |
|
| 88 | + } else |
|
| 91 | 89 | { |
| 92 | 90 | $data = $entryFcn( $items ); |
| 93 | 91 | } |
@@ -52,8 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | $cntl->delete( array_column( $payload->data, 'id' ) ); |
| 55 | - } |
|
| 56 | - else |
|
| 55 | + } else |
|
| 57 | 56 | { |
| 58 | 57 | $cntl->delete( $relId ); |
| 59 | 58 | } |
@@ -101,8 +100,7 @@ discard block |
||
| 101 | 100 | $total = 0; |
| 102 | 101 | $view->items = $cntl->parse( $view->param( 'filter', [] ) )->list( $total ); |
| 103 | 102 | $view->total = $total; |
| 104 | - } |
|
| 105 | - else |
|
| 103 | + } else |
|
| 106 | 104 | { |
| 107 | 105 | $view->items = $cntl->get( $relId ); |
| 108 | 106 | $view->total = 1; |
@@ -158,9 +158,11 @@ |
||
| 158 | 158 | $params = $view->param( 'filter', [] ); |
| 159 | 159 | $prodIds = (array) $view->param( 'filter/s_prodid', [] ); |
| 160 | 160 | |
| 161 | - if( isset( $params['s_prodcode'] ) ) // backwards compatibility |
|
| 161 | + if( isset( $params['s_prodcode'] ) ) { |
|
| 162 | + // backwards compatibility |
|
| 162 | 163 | { |
| 163 | 164 | $manager = \Aimeos\MShop::create( $this->getContext(), 'product' ); |
| 165 | + } |
|
| 164 | 166 | $filter = $manager->filter() |
| 165 | 167 | ->slice( 0, count( (array) $params['s_prodcode'] ) ) |
| 166 | 168 | ->add( ['product.code' => $view->param( 'filter/s_prodcode' )] ); |
@@ -81,8 +81,7 @@ |
||
| 81 | 81 | */ |
| 82 | 82 | $tplconf = 'client/jsonapi/product/template-aggregate'; |
| 83 | 83 | $default = 'aggregate-standard'; |
| 84 | - } |
|
| 85 | - else |
|
| 84 | + } else |
|
| 86 | 85 | { |
| 87 | 86 | /** client/jsonapi/product/template |
| 88 | 87 | * Relative path to the product JSON API template |
@@ -225,8 +225,7 @@ |
||
| 225 | 225 | */ |
| 226 | 226 | $tplconf = 'client/jsonapi/review/template-aggregate'; |
| 227 | 227 | $default = 'aggregate-standard'; |
| 228 | - } |
|
| 229 | - else |
|
| 228 | + } else |
|
| 230 | 229 | { |
| 231 | 230 | /** client/jsonapi/review/template |
| 232 | 231 | * Relative path to the review JSON API template |