@@ -101,8 +101,7 @@ |
||
101 | 101 | foreach( $items as $item ) { |
102 | 102 | $data[] = $entryFcn( $item ); |
103 | 103 | } |
104 | - } |
|
105 | - else |
|
104 | + } else |
|
106 | 105 | { |
107 | 106 | $data = $entryFcn( $items ); |
108 | 107 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $first = ( $offset > 0 ? 0 : null ); |
24 | 24 | $prev = ( $offset - $limit >= 0 ? $offset - $limit : null ); |
25 | 25 | $next = ( $offset + $limit < $total ? $offset + $limit : null ); |
26 | -$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null ); |
|
26 | +$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null ); |
|
27 | 27 | |
28 | 28 | |
29 | 29 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); |
@@ -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 ) ); |
@@ -374,7 +374,7 @@ |
||
374 | 374 | $baseManager = \Aimeos\MShop::create( $this->context, 'order/base' ); |
375 | 375 | |
376 | 376 | $search = $baseManager->createSearch(); |
377 | - $search->setConditions( $search->compare( '==', 'order.base.price', '672.00') ); |
|
377 | + $search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) ); |
|
378 | 378 | |
379 | 379 | $items = $baseManager->searchItems( $search ); |
380 | 380 |
@@ -374,7 +374,7 @@ |
||
374 | 374 | $baseManager = \Aimeos\MShop::create( $this->context, 'order/base' ); |
375 | 375 | |
376 | 376 | $search = $baseManager->createSearch(); |
377 | - $search->setConditions( $search->compare( '==', 'order.base.price', '672.00') ); |
|
377 | + $search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) ); |
|
378 | 378 | |
379 | 379 | $items = $baseManager->searchItems( $search ); |
380 | 380 |
@@ -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 | } |
@@ -87,7 +87,7 @@ |
||
87 | 87 | else |
88 | 88 | { |
89 | 89 | $total = 0; |
90 | - $items = $cntl->slice( $view->param( 'page/offset', 0), $view->param( 'page/limit', 25 ) ) |
|
90 | + $items = $cntl->slice( $view->param( 'page/offset', 0 ), $view->param( 'page/limit', 25 ) ) |
|
91 | 91 | ->sort( $view->param( 'sort' ) )->parse( $view->param( 'filter', [] ) )->search( $total ); |
92 | 92 | |
93 | 93 | $view->items = $items; |
@@ -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 ) ) |
@@ -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; |