@@ -99,8 +99,7 @@ |
||
| 99 | 99 | $decorators = $config->get( 'client/jsonapi/' . $dpath . 'decorators/local', [] ); |
| 100 | 100 | $client = self::addDecorators( $client, $decorators, $classprefix, $context, $path ); |
| 101 | 101 | } |
| 102 | - } |
|
| 103 | - else |
|
| 102 | + } else |
|
| 104 | 103 | { |
| 105 | 104 | $classprefix = '\\Aimeos\\Client\\JsonApi\\Common\\Decorator\\'; |
| 106 | 105 | $client = self::addDecorators( $client, $decorators, $classprefix, $context, $path ); |
@@ -59,8 +59,7 @@ |
||
| 59 | 59 | if( ( $client = @call_user_func_array( [$factory, 'create'], [$context, $path, $name] ) ) === false ) { |
| 60 | 60 | throw new \Aimeos\Client\JsonApi\Exception( sprintf( 'Invalid factory "%1$s"', $factory ), 400 ); |
| 61 | 61 | } |
| 62 | - } |
|
| 63 | - else |
|
| 62 | + } else |
|
| 64 | 63 | { |
| 65 | 64 | $client = self::createRoot( $context, $path, $name ); |
| 66 | 65 | } |
@@ -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 ) ) |
@@ -81,8 +81,7 @@ |
||
| 81 | 81 | */ |
| 82 | 82 | $tplconf = 'client/jsonapi/product/standard/template-aggregate'; |
| 83 | 83 | $default = 'aggregate-standard'; |
| 84 | - } |
|
| 85 | - else |
|
| 84 | + } else |
|
| 86 | 85 | { |
| 87 | 86 | /** client/jsonapi/product/standard/template |
| 88 | 87 | * Relative path to the product JSON API template |
@@ -78,8 +78,7 @@ |
||
| 78 | 78 | |
| 79 | 79 | $this->controller->deleteService( $entry->id ); |
| 80 | 80 | } |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $this->controller->deleteService( $relId ); |
| 85 | 84 | } |
@@ -78,8 +78,7 @@ |
||
| 78 | 78 | |
| 79 | 79 | $this->controller->deleteProduct( $entry->id ); |
| 80 | 80 | } |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $this->controller->deleteProduct( $relId ); |
| 85 | 84 | } |
@@ -78,8 +78,7 @@ |
||
| 78 | 78 | |
| 79 | 79 | $this->controller->deleteCoupon( $entry->id ); |
| 80 | 80 | } |
| 81 | - } |
|
| 82 | - else |
|
| 81 | + } else |
|
| 83 | 82 | { |
| 84 | 83 | $this->controller->deleteCoupon( $relId ); |
| 85 | 84 | } |
@@ -35,8 +35,7 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | |
| 38 | -$entryFcn = function( \Aimeos\MShop\Supplier\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 39 | -{ |
|
| 38 | +$entryFcn = function( \Aimeos\MShop\Supplier\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 40 | 39 | $id = $item->getId(); |
| 41 | 40 | $type = $item->getResourceType(); |
| 42 | 41 | $params = array( 'resource' => $type, 'id' => $id ); |
@@ -83,8 +82,7 @@ discard block |
||
| 83 | 82 | }; |
| 84 | 83 | |
| 85 | 84 | |
| 86 | -$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, $target, $cntl, $action, $config, &$refFcn ) |
|
| 87 | -{ |
|
| 85 | +$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, $target, $cntl, $action, $config, &$refFcn ) { |
|
| 88 | 86 | $id = $item->getId(); |
| 89 | 87 | $type = $item->getResourceType(); |
| 90 | 88 | |
@@ -132,8 +130,7 @@ discard block |
||
| 132 | 130 | }; |
| 133 | 131 | |
| 134 | 132 | |
| 135 | -$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) |
|
| 136 | -{ |
|
| 133 | +$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) { |
|
| 137 | 134 | $map = []; |
| 138 | 135 | |
| 139 | 136 | if( $item instanceof \Aimeos\MShop\Supplier\Item\Iface ) |
@@ -164,8 +161,7 @@ discard block |
||
| 164 | 161 | }; |
| 165 | 162 | |
| 166 | 163 | |
| 167 | -$flatFcn = function( array $map ) |
|
| 168 | -{ |
|
| 164 | +$flatFcn = function( array $map ) { |
|
| 169 | 165 | $result = []; |
| 170 | 166 | |
| 171 | 167 | foreach( $map as $list ) |
@@ -230,8 +226,7 @@ discard block |
||
| 230 | 226 | $data[] = $entryFcn( $item ); |
| 231 | 227 | $included = array_merge( $included, $flatFcn( $inclFcn( $item ) ) ); |
| 232 | 228 | } |
| 233 | - } |
|
| 234 | - else |
|
| 229 | + } else |
|
| 235 | 230 | { |
| 236 | 231 | $data = $entryFcn( $items ); |
| 237 | 232 | $included = $flatFcn( $inclFcn( $items ) ); |
@@ -101,8 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | |
| 104 | -$entryFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
| 105 | -{ |
|
| 104 | +$entryFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
| 106 | 105 | $id = $item->getId(); |
| 107 | 106 | $attributes = $item->toArray(); |
| 108 | 107 | $type = $item->getResourceType(); |
@@ -150,8 +149,7 @@ discard block |
||
| 150 | 149 | }; |
| 151 | 150 | |
| 152 | 151 | |
| 153 | -$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, &$refFcn ) |
|
| 154 | -{ |
|
| 152 | +$refFcn = function( \Aimeos\MShop\Common\Item\Iface $item, array $map ) use ( $fields, &$refFcn ) { |
|
| 155 | 153 | $id = $item->getId(); |
| 156 | 154 | $type = $item->getResourceType(); |
| 157 | 155 | |
@@ -199,8 +197,7 @@ discard block |
||
| 199 | 197 | }; |
| 200 | 198 | |
| 201 | 199 | |
| 202 | -$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) |
|
| 203 | -{ |
|
| 200 | +$inclFcn = function( \Aimeos\MShop\Common\Item\Iface $item ) use ( $refFcn ) { |
|
| 204 | 201 | $map = []; |
| 205 | 202 | |
| 206 | 203 | if( $item instanceof \Aimeos\MShop\Common\Item\ListRef\Iface ) |
@@ -224,8 +221,7 @@ discard block |
||
| 224 | 221 | }; |
| 225 | 222 | |
| 226 | 223 | |
| 227 | -$flatFcn = function( array $map ) |
|
| 228 | -{ |
|
| 224 | +$flatFcn = function( array $map ) { |
|
| 229 | 225 | $result = []; |
| 230 | 226 | |
| 231 | 227 | foreach( $map as $list ) |
@@ -290,8 +286,7 @@ discard block |
||
| 290 | 286 | $data[] = $entryFcn( $item ); |
| 291 | 287 | $included = array_merge( $included, $flatFcn( $inclFcn( $item, [] ) ) ); |
| 292 | 288 | } |
| 293 | - } |
|
| 294 | - else |
|
| 289 | + } else |
|
| 295 | 290 | { |
| 296 | 291 | $data = $entryFcn( $items ); |
| 297 | 292 | $included = $flatFcn( $inclFcn( $items, [] ) ); |