@@ -37,8 +37,7 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | |
| 40 | -$entryFcn = function( \Aimeos\MShop\Supplier\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 41 | -{ |
|
| 40 | +$entryFcn = function( \Aimeos\MShop\Supplier\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 42 | 41 | $id = $item->getId(); |
| 43 | 42 | $type = $item->getResourceType(); |
| 44 | 43 | $params = array( 'resource' => $type, 'id' => $id ); |
@@ -130,8 +129,7 @@ discard block |
||
| 130 | 129 | foreach( $items as $item ) { |
| 131 | 130 | $data[] = $entryFcn( $item ); |
| 132 | 131 | } |
| 133 | - } |
|
| 134 | - else |
|
| 132 | + } else |
|
| 135 | 133 | { |
| 136 | 134 | $data = $entryFcn( $items ); |
| 137 | 135 | } |
@@ -103,8 +103,7 @@ discard block |
||
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | |
| 106 | -$entryFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 107 | -{ |
|
| 106 | +$entryFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 108 | 107 | $id = $item->getId(); |
| 109 | 108 | $attributes = $item->toArray(); |
| 110 | 109 | $type = $item->getResourceType(); |
@@ -196,8 +195,7 @@ discard block |
||
| 196 | 195 | foreach( $items as $item ) { |
| 197 | 196 | $data[] = $entryFcn( $item ); |
| 198 | 197 | } |
| 199 | - } |
|
| 200 | - else |
|
| 198 | + } else |
|
| 201 | 199 | { |
| 202 | 200 | $data = $entryFcn( $items ); |
| 203 | 201 | } |
@@ -37,8 +37,7 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | |
| 40 | -$entryFcn = function( \Aimeos\MShop\Attribute\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 41 | -{ |
|
| 40 | +$entryFcn = function( \Aimeos\MShop\Attribute\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 42 | 41 | $id = $item->getId(); |
| 43 | 42 | $type = $item->getResourceType(); |
| 44 | 43 | $params = array( 'resource' => $type, 'id' => $id ); |
@@ -129,8 +128,7 @@ discard block |
||
| 129 | 128 | foreach( $items as $item ) { |
| 130 | 129 | $data[] = $entryFcn( $item ); |
| 131 | 130 | } |
| 132 | - } |
|
| 133 | - else |
|
| 131 | + } else |
|
| 134 | 132 | { |
| 135 | 133 | $data = $entryFcn( $items ); |
| 136 | 134 | } |
@@ -29,8 +29,7 @@ discard block |
||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | |
| 32 | -$entryFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 33 | -{ |
|
| 32 | +$entryFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 34 | 33 | if( $item->isAvailable() === false ) { |
| 35 | 34 | return []; |
| 36 | 35 | } |
@@ -80,8 +79,7 @@ discard block |
||
| 80 | 79 | }; |
| 81 | 80 | |
| 82 | 81 | |
| 83 | -$catFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) |
|
| 84 | -{ |
|
| 82 | +$catFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) { |
|
| 85 | 83 | $params = ['resource' => 'catalog', 'id' => $item->getId()]; |
| 86 | 84 | $entry['links'] = [ |
| 87 | 85 | 'self' => [ |
@@ -125,8 +123,7 @@ discard block |
||
| 125 | 123 | foreach( $items as $item ) { |
| 126 | 124 | $data[] = $entryFcn( $item ); |
| 127 | 125 | } |
| 128 | - } |
|
| 129 | - else |
|
| 126 | + } else |
|
| 130 | 127 | { |
| 131 | 128 | $data = $entryFcn( $items ); |
| 132 | 129 | } |
@@ -83,8 +83,7 @@ |
||
| 83 | 83 | { |
| 84 | 84 | $view->items = $cntl->get( $id ); |
| 85 | 85 | $view->total = 1; |
| 86 | - } |
|
| 87 | - else |
|
| 86 | + } else |
|
| 88 | 87 | { |
| 89 | 88 | $total = 0; |
| 90 | 89 | $items = $cntl->slice( $view->param( 'page/offset', 0 ), $view->param( 'page/limit', 25 ) ) |
@@ -27,8 +27,7 @@ discard block |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | |
| 30 | -$entryFcn = function( \Aimeos\MShop\Service\Item\Iface $item, \Aimeos\Map $prices, array $feConfig ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 31 | -{ |
|
| 30 | +$entryFcn = function( \Aimeos\MShop\Service\Item\Iface $item, \Aimeos\Map $prices, array $feConfig ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 32 | 31 | $metadata = []; |
| 33 | 32 | $id = $item->getId(); |
| 34 | 33 | $type = $item->getResourceType(); |
@@ -121,8 +120,7 @@ discard block |
||
| 121 | 120 | foreach( $items as $item ) { |
| 122 | 121 | $data[] = $entryFcn( $item, $prices, $feConfig ); |
| 123 | 122 | } |
| 124 | - } |
|
| 125 | - else |
|
| 123 | + } else |
|
| 126 | 124 | { |
| 127 | 125 | $data = $entryFcn( $items, $prices, $feConfig ); |
| 128 | 126 | } |
@@ -58,8 +58,7 @@ |
||
| 58 | 58 | $view->items = $provider->getServiceItem(); |
| 59 | 59 | $view->total = 1; |
| 60 | 60 | } |
| 61 | - } |
|
| 62 | - else |
|
| 61 | + } else |
|
| 63 | 62 | { |
| 64 | 63 | $attributes = []; |
| 65 | 64 | $items = map(); |
@@ -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; |