@@ -160,8 +160,7 @@ discard block |
||
| 160 | 160 | $search->add( $search->is( 'locale.site.id', '==', $id ) )->slice( 0, 1 ); |
| 161 | 161 | $view->data = $manager->search( $search, [], $total ) |
| 162 | 162 | ->first( new \Aimeos\MShop\Exception( $view->translate( 'admin', 'Item not available' ) ) ); |
| 163 | - } |
|
| 164 | - else |
|
| 163 | + } else |
|
| 165 | 164 | { |
| 166 | 165 | $view->data = $manager->search( $search, [], $total ); |
| 167 | 166 | } |
@@ -193,8 +192,7 @@ discard block |
||
| 193 | 192 | } |
| 194 | 193 | |
| 195 | 194 | $item = $manager->save( $item ); |
| 196 | - } |
|
| 197 | - else |
|
| 195 | + } else |
|
| 198 | 196 | { |
| 199 | 197 | $item = $manager->create(); |
| 200 | 198 | |
@@ -182,8 +182,7 @@ discard block |
||
| 182 | 182 | $view->data = $manager->search( $search, $include, $total ); |
| 183 | 183 | $view->listItems = $this->getListItems( $view->data, $include ); |
| 184 | 184 | $view->childItems = map(); |
| 185 | - } |
|
| 186 | - else |
|
| 185 | + } else |
|
| 187 | 186 | { |
| 188 | 187 | $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE; |
| 189 | 188 | if( in_array( 'catalog', $include ) ) { |
@@ -240,8 +239,7 @@ discard block |
||
| 240 | 239 | if( isset( $entry->parentid ) && $targetId !== null ) { |
| 241 | 240 | $manager->move( $item->getId(), $entry->parentid, $targetId, $refId ); |
| 242 | 241 | } |
| 243 | - } |
|
| 244 | - else |
|
| 242 | + } else |
|
| 245 | 243 | { |
| 246 | 244 | $item = $manager->create(); |
| 247 | 245 | |
@@ -129,8 +129,7 @@ discard block |
||
| 129 | 129 | $view->total = count( $payload->data ); |
| 130 | 130 | $view->data = $payload->data; |
| 131 | 131 | $id = $payload->data; |
| 132 | - } |
|
| 133 | - else |
|
| 132 | + } else |
|
| 134 | 133 | { |
| 135 | 134 | $view->total = 1; |
| 136 | 135 | $view->data = $id; |
@@ -223,8 +222,7 @@ discard block |
||
| 223 | 222 | { |
| 224 | 223 | $response = $response->withHeader( 'Content-Type', 'application/vnd.api+json; ext="bulk"; supported-ext="bulk"' ); |
| 225 | 224 | $ids = $payload->data; |
| 226 | - } |
|
| 227 | - else |
|
| 225 | + } else |
|
| 228 | 226 | { |
| 229 | 227 | $ids = [$payload->data]; |
| 230 | 228 | } |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | |
| 24 | -$build = function( array $attrItems, $id ) use ( $fields ) |
|
| 25 | -{ |
|
| 24 | +$build = function( array $attrItems, $id ) use ( $fields ) { |
|
| 26 | 25 | $result = []; |
| 27 | 26 | $type = 'criteria/attribute'; |
| 28 | 27 | |
@@ -58,8 +57,11 @@ discard block |
||
| 58 | 57 | <?php if( isset( $this->errors ) ) : ?> |
| 59 | 58 | , "errors": <?= $this->partial( $this->config( $this->get( 'partial-errors', 'admin/jsonadm/partials/template-errors' ), 'partials/errors' ), array( 'errors' => $this->errors ) ); ?> |
| 60 | 59 | |
| 61 | - <?php else : ?> |
|
| 62 | - , "data": <?= json_encode( $build( $configItems, $this->param( 'id' ) ), $options ); ?> |
|
| 60 | + <?php else { |
|
| 61 | + : ?> |
|
| 62 | + , "data": <?= json_encode( $build( $configItems, $this->param( 'id' ) ), $options ); |
|
| 63 | +} |
|
| 64 | +?> |
|
| 63 | 65 | |
| 64 | 66 | <?php endif; ?> |
| 65 | 67 | } |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | |
| 24 | -$build = function( \Aimeos\MShop\Order\Item\Iface $item, \Aimeos\Map $childItems ) use ( $fields ) |
|
| 25 | -{ |
|
| 24 | +$build = function( \Aimeos\MShop\Order\Item\Iface $item, \Aimeos\Map $childItems ) use ( $fields ) { |
|
| 26 | 25 | $id = $item->getId(); |
| 27 | 26 | $baseId = $item->getBaseId(); |
| 28 | 27 | $type = $item->getResourceType(); |
@@ -79,12 +78,10 @@ discard block |
||
| 79 | 78 | foreach( $data as $item ) { |
| 80 | 79 | $response[] = $build( $item, $childItems ); |
| 81 | 80 | } |
| 82 | -} |
|
| 83 | -elseif( $data !== null ) |
|
| 81 | +} elseif( $data !== null ) |
|
| 84 | 82 | { |
| 85 | 83 | $response = $build( $data, $childItems ); |
| 86 | -} |
|
| 87 | -else |
|
| 84 | +} else |
|
| 88 | 85 | { |
| 89 | 86 | $response = null; |
| 90 | 87 | } |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | |
| 24 | -$build = function( \Aimeos\MShop\Order\Item\Base\Iface $item, \Aimeos\Map $childItems ) use ( $fields ) |
|
| 25 | -{ |
|
| 24 | +$build = function( \Aimeos\MShop\Order\Item\Base\Iface $item, \Aimeos\Map $childItems ) use ( $fields ) { |
|
| 26 | 25 | $id = $item->getId(); |
| 27 | 26 | $type = $item->getResourceType(); |
| 28 | 27 | $params = array( 'resource' => $type, 'id' => $id ); |
@@ -76,12 +75,10 @@ discard block |
||
| 76 | 75 | foreach( $data as $item ) { |
| 77 | 76 | $response[] = $build( $item, $childItems ); |
| 78 | 77 | } |
| 79 | -} |
|
| 80 | -elseif( $data !== null ) |
|
| 78 | +} elseif( $data !== null ) |
|
| 81 | 79 | { |
| 82 | 80 | $response = $build( $data, $childItems ); |
| 83 | -} |
|
| 84 | -else |
|
| 81 | +} else |
|
| 85 | 82 | { |
| 86 | 83 | $response = null; |
| 87 | 84 | } |
@@ -21,8 +21,7 @@ |
||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | |
| 24 | -$build = function( \Aimeos\Map $items ) use ( $fields ) |
|
| 25 | -{ |
|
| 24 | +$build = function( \Aimeos\Map $items ) use ( $fields ) { |
|
| 26 | 25 | $list = []; |
| 27 | 26 | |
| 28 | 27 | $target = $this->config( 'admin/jsonadm/url/target' ); |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | |
| 24 | -$build = function( \Aimeos\MShop\Catalog\Item\Iface $item, \Aimeos\Map $listItems ) use ( $fields ) |
|
| 25 | -{ |
|
| 24 | +$build = function( \Aimeos\MShop\Catalog\Item\Iface $item, \Aimeos\Map $listItems ) use ( $fields ) { |
|
| 26 | 25 | $id = $item->getId(); |
| 27 | 26 | $type = $item->getResourceType(); |
| 28 | 27 | $params = array( 'resource' => $type, 'id' => $id ); |
@@ -85,12 +84,10 @@ discard block |
||
| 85 | 84 | foreach( $data as $item ) { |
| 86 | 85 | $response[] = $build( $item, $listItems ); |
| 87 | 86 | } |
| 88 | -} |
|
| 89 | -elseif( $data !== null ) |
|
| 87 | +} elseif( $data !== null ) |
|
| 90 | 88 | { |
| 91 | 89 | $response = $build( $data, $listItems ); |
| 92 | -} |
|
| 93 | -else |
|
| 90 | +} else |
|
| 94 | 91 | { |
| 95 | 92 | $response = null; |
| 96 | 93 | } |
@@ -21,8 +21,7 @@ discard block |
||
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | |
| 24 | -$build = function( \Aimeos\MShop\Common\Item\Iface $item, \Aimeos\Map $childItems, \Aimeos\Map $listItems ) use ( $fields ) |
|
| 25 | -{ |
|
| 24 | +$build = function( \Aimeos\MShop\Common\Item\Iface $item, \Aimeos\Map $childItems, \Aimeos\Map $listItems ) use ( $fields ) { |
|
| 26 | 25 | $id = strtoupper( $item->getId() ); |
| 27 | 26 | $type = $item->getResourceType(); |
| 28 | 27 | $params = array( 'resource' => $type, 'id' => $id ); |
@@ -89,12 +88,10 @@ discard block |
||
| 89 | 88 | foreach( $data as $item ) { |
| 90 | 89 | $response[] = $build( $item, $childItems, $listItems ); |
| 91 | 90 | } |
| 92 | -} |
|
| 93 | -elseif( $data !== null ) |
|
| 91 | +} elseif( $data !== null ) |
|
| 94 | 92 | { |
| 95 | 93 | $response = $build( $data, $childItems, $listItems ); |
| 96 | -} |
|
| 97 | -else |
|
| 94 | +} else |
|
| 98 | 95 | { |
| 99 | 96 | $response = null; |
| 100 | 97 | } |