@@ -222,8 +222,7 @@ |
||
222 | 222 | $data[] = $entryFcn( $attrItem ); |
223 | 223 | $included = array_merge( $included, $flatFcn( $inclFcn( $attrItem ) ) ); |
224 | 224 | } |
225 | - } |
|
226 | - else |
|
225 | + } else |
|
227 | 226 | { |
228 | 227 | $data = $entryFcn( $items ); |
229 | 228 | $included = $flatFcn( $inclFcn( $items ) ); |
@@ -285,8 +285,7 @@ |
||
285 | 285 | $data[] = $entryFcn( $item ); |
286 | 286 | $included = array_merge( $included, $flatFcn( $inclFcn( $item ) ) ); |
287 | 287 | } |
288 | - } |
|
289 | - else |
|
288 | + } else |
|
290 | 289 | { |
291 | 290 | $data = $entryFcn( $items ); |
292 | 291 | $included = $flatFcn( $inclFcn( $items ) ); |
@@ -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 | } |
@@ -227,10 +227,13 @@ discard block |
||
227 | 227 | $allowed = '["GET"]'; |
228 | 228 | if( isset( $this->item ) && $this->item->getId() === null ) |
229 | 229 | { |
230 | - try { |
|
230 | + try |
|
231 | + { |
|
231 | 232 | $this->item->check(); |
232 | 233 | $allowed = '["DELETE","GET","PATCH","POST"]'; |
233 | - } catch( \Aimeos\MShop\Exception $e ) { |
|
234 | + } |
|
235 | + catch( \Aimeos\MShop\Exception $e ) |
|
236 | + { |
|
234 | 237 | $allowed = '["DELETE","GET","PATCH"]'; |
235 | 238 | } |
236 | 239 | } |
@@ -277,10 +280,13 @@ discard block |
||
277 | 280 | "href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'basket', 'id' => $basketId, 'related' => 'coupon'], [], $config ); ?>", |
278 | 281 | "allow": ["POST"] |
279 | 282 | } |
280 | - <?php else : ?> |
|
283 | + <?php else { |
|
284 | + : ?> |
|
281 | 285 | , |
282 | 286 | "order": { |
283 | - "href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config ); ?>", |
|
287 | + "href": "<?= $this->url( $target, $cntl, $action, ['resource' => 'order'], [], $config ); |
|
288 | +} |
|
289 | +?>", |
|
284 | 290 | "allow": ["POST"] |
285 | 291 | } |
286 | 292 | <?php endif; ?> |
@@ -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 | $type = $view->param( 'filter/cs_type' ); |
@@ -75,8 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | $this->controller->deleteAddressItem( $entry->id ); |
77 | 77 | } |
78 | - } |
|
79 | - else |
|
78 | + } else |
|
80 | 79 | { |
81 | 80 | $this->controller->deleteAddressItem( $relId ); |
82 | 81 | } |
@@ -123,8 +122,7 @@ discard block |
||
123 | 122 | { |
124 | 123 | $view->items = $cntl->getItem( $view->param( 'id' ), ['customer/address'] )->getAddressItems(); |
125 | 124 | $view->total = count( $view->items ); |
126 | - } |
|
127 | - else |
|
125 | + } else |
|
128 | 126 | { |
129 | 127 | $view->items = $cntl->getAddressItem( $relId ); |
130 | 128 | $view->total = 1; |
@@ -75,8 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | $this->controller->deleteListItem( $entry->id ); |
77 | 77 | } |
78 | - } |
|
79 | - else |
|
78 | + } else |
|
80 | 79 | { |
81 | 80 | $this->controller->deleteListItem( $relId ); |
82 | 81 | } |
@@ -124,8 +123,7 @@ discard block |
||
124 | 123 | { |
125 | 124 | $filter = $this->initCriteria( $cntl->createListsFilter(), $view->param( 'filter', [] ) ); |
126 | 125 | $view->items = $cntl->searchListItems( $filter, $total ); |
127 | - } |
|
128 | - else |
|
126 | + } else |
|
129 | 127 | { |
130 | 128 | $view->items = $cntl->getListItem( $relId ); |
131 | 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 ) ) |
@@ -43,8 +43,7 @@ |
||
43 | 43 | { |
44 | 44 | $view->items = $cntl->getItem( $id ); |
45 | 45 | $view->total = 1; |
46 | - } |
|
47 | - else |
|
46 | + } else |
|
48 | 47 | { |
49 | 48 | $total = 0; |
50 | 49 | $filter = $cntl->createFilter(); |