@@ -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; |
@@ -425,7 +425,7 @@ |
||
| 425 | 425 | $baseManager = \Aimeos\MShop::create( $this->context, 'order/base' ); |
| 426 | 426 | |
| 427 | 427 | $search = $baseManager->createSearch(); |
| 428 | - $search->setConditions( $search->compare( '==', 'order.base.price', '672.00') ); |
|
| 428 | + $search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) ); |
|
| 429 | 429 | |
| 430 | 430 | $items = $baseManager->searchItems( $search, ['order/base/product'] ); |
| 431 | 431 | |
@@ -26,8 +26,7 @@ discard block |
||
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | |
| 29 | -$entryFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 30 | -{ |
|
| 29 | +$entryFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 31 | 30 | $allow = array( 'GET' ); |
| 32 | 31 | $attributes = $item->toArray(); |
| 33 | 32 | $params = ['resource' => 'basket', 'id' => $basketId]; |
@@ -95,8 +94,7 @@ discard block |
||
| 95 | 94 | }; |
| 96 | 95 | |
| 97 | 96 | |
| 98 | -$productFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 99 | -{ |
|
| 97 | +$productFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 100 | 98 | $products = []; |
| 101 | 99 | |
| 102 | 100 | foreach( $item->getProducts() as $position => $orderProduct ) |
@@ -137,8 +135,7 @@ discard block |
||
| 137 | 135 | }; |
| 138 | 136 | |
| 139 | 137 | |
| 140 | -$serviceFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 141 | -{ |
|
| 138 | +$serviceFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 142 | 139 | $services = []; |
| 143 | 140 | |
| 144 | 141 | foreach( $item->getServices() as $type => $list ) |
@@ -171,8 +168,7 @@ discard block |
||
| 171 | 168 | }; |
| 172 | 169 | |
| 173 | 170 | |
| 174 | -$addressFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 175 | -{ |
|
| 171 | +$addressFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 176 | 172 | $list = []; |
| 177 | 173 | |
| 178 | 174 | foreach( $item->getAddresses() as $type => $addresses ) |
@@ -201,8 +197,7 @@ discard block |
||
| 201 | 197 | }; |
| 202 | 198 | |
| 203 | 199 | |
| 204 | -$couponFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 205 | -{ |
|
| 200 | +$couponFcn = function( \Aimeos\MShop\Order\Item\Base\Iface $item, $basketId ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 206 | 201 | $coupons = []; |
| 207 | 202 | |
| 208 | 203 | foreach( $item->getCoupons() as $code => $list ) |
@@ -268,10 +263,13 @@ discard block |
||
| 268 | 263 | "href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'basket', 'id' => $basketId, 'related' => 'coupon'], [], $config ); ?>", |
| 269 | 264 | "allow": ["POST"] |
| 270 | 265 | } |
| 271 | - <?php else : ?> |
|
| 266 | + <?php else { |
|
| 267 | + : ?> |
|
| 272 | 268 | , |
| 273 | 269 | "order": { |
| 274 | - "href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config ); ?>", |
|
| 270 | + "href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config ); |
|
| 271 | +} |
|
| 272 | +?>", |
|
| 275 | 273 | "allow": ["POST"] |
| 276 | 274 | } |
| 277 | 275 | <?php endif; ?> |
@@ -43,8 +43,7 @@ |
||
| 43 | 43 | { |
| 44 | 44 | $view->items = $cntl->get( $id ); |
| 45 | 45 | $view->total = 1; |
| 46 | - } |
|
| 47 | - else |
|
| 46 | + } else |
|
| 48 | 47 | { |
| 49 | 48 | $total = 0; |
| 50 | 49 | $items = $cntl->parse( (array) $view->param( 'filter', [] ) ) |
@@ -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->deletePropertyItem( $items[$relId] )->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 = isset( $items[$relId] ) ? $items[$relId] : null; |
| 120 | 118 | $view->total = empty( $view->items ) ? 0 : 1; |