@@ -24,8 +24,7 @@ discard block |
||
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | |
| 27 | -$entryFcn = function( \Aimeos\MShop\Subscription\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 28 | -{ |
|
| 27 | +$entryFcn = function( \Aimeos\MShop\Subscription\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 29 | 28 | $id = $item->getId(); |
| 30 | 29 | $attributes = $item->toArray(); |
| 31 | 30 | $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 | } |
@@ -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 | -$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, $target, $cntl, $action, $config, &$refFcn ) |
|
| 84 | -{ |
|
| 82 | +$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, $target, $cntl, $action, $config, &$refFcn ) { |
|
| 85 | 83 | $id = $item->getId(); |
| 86 | 84 | $type = $item->getResourceType(); |
| 87 | 85 | |
@@ -150,8 +148,7 @@ discard block |
||
| 150 | 148 | }; |
| 151 | 149 | |
| 152 | 150 | |
| 153 | -$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) |
|
| 154 | -{ |
|
| 151 | +$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) { |
|
| 155 | 152 | $map = []; |
| 156 | 153 | |
| 157 | 154 | if( $item instanceof \Aimeos\MShop\Catalog\Item\Iface ) |
@@ -185,8 +182,7 @@ discard block |
||
| 185 | 182 | }; |
| 186 | 183 | |
| 187 | 184 | |
| 188 | -$flatFcn = function( array $map ) |
|
| 189 | -{ |
|
| 185 | +$flatFcn = function( array $map ) { |
|
| 190 | 186 | $result = []; |
| 191 | 187 | |
| 192 | 188 | foreach( $map as $list ) |
@@ -36,8 +36,11 @@ |
||
| 36 | 36 | <?php if( isset( $this->errors ) ) : ?> |
| 37 | 37 | "errors": <?= json_encode( $this->errors, JSON_PRETTY_PRINT ); ?> |
| 38 | 38 | |
| 39 | - <?php else : ?> |
|
| 40 | - "data": <?= json_encode( $entries ); ?> |
|
| 39 | + <?php else { |
|
| 40 | + : ?> |
|
| 41 | + "data": <?= json_encode( $entries ); |
|
| 42 | +} |
|
| 43 | +?> |
|
| 41 | 44 | |
| 42 | 45 | <?php endif; ?> |
| 43 | 46 | } |
@@ -63,8 +63,7 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | $cntl->store(); |
| 66 | - } |
|
| 67 | - else |
|
| 66 | + } else |
|
| 68 | 67 | { |
| 69 | 68 | if( isset( $items[$relId] ) ) { |
| 70 | 69 | $cntl->deleteAddressItem( $items[$relId] )->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; |
@@ -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 = $prices = $items = []; |
| 65 | 64 | $cntl->type( $view->param( 'filter/cs_type' ) ); |
@@ -66,8 +66,7 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | $cntl->store(); |
| 69 | - } |
|
| 70 | - else |
|
| 69 | + } else |
|
| 71 | 70 | { |
| 72 | 71 | if( isset( $items[$relId] ) ) { |
| 73 | 72 | $cntl->deleteListItem( $items[$relId]->getDomain(), $items[$relId] )->store(); |
@@ -119,8 +118,7 @@ discard block |
||
| 119 | 118 | { |
| 120 | 119 | $view->items = $items; |
| 121 | 120 | $view->total = count( $items ); |
| 122 | - } |
|
| 123 | - else |
|
| 121 | + } else |
|
| 124 | 122 | { |
| 125 | 123 | $view->items = isset( $items[$relId] ) ? $items[$relId] : null; |
| 126 | 124 | $view->total = empty( $view->items ) ? 0 : 1; |