@@ -268,7 +268,7 @@ |
||
| 268 | 268 | $baseManager = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' ); |
| 269 | 269 | |
| 270 | 270 | $search = $baseManager->createSearch(); |
| 271 | - $search->setConditions( $search->compare( '==', 'order.base.price', '672.00') ); |
|
| 271 | + $search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) ); |
|
| 272 | 272 | |
| 273 | 273 | $items = $baseManager->searchItems( $search ); |
| 274 | 274 | |
@@ -83,8 +83,7 @@ |
||
| 83 | 83 | foreach( $items as $localeItem ) { |
| 84 | 84 | $data[] = $entryFcn( $localeItem ); |
| 85 | 85 | } |
| 86 | - } |
|
| 87 | - else |
|
| 86 | + } else |
|
| 88 | 87 | { |
| 89 | 88 | $data = $entryFcn( $items ); |
| 90 | 89 | } |
@@ -91,8 +91,7 @@ |
||
| 91 | 91 | foreach( $items as $addrItem ) { |
| 92 | 92 | $data[] = $entryFcn( $addrItem ); |
| 93 | 93 | } |
| 94 | - } |
|
| 95 | - else |
|
| 94 | + } else |
|
| 96 | 95 | { |
| 97 | 96 | $data = $entryFcn( $items ); |
| 98 | 97 | } |
@@ -156,8 +156,7 @@ |
||
| 156 | 156 | $data[] = $entryFcn( $item, $prices, $feConfig ); |
| 157 | 157 | $included = array_merge( $included, $refFcn( $item ) ); |
| 158 | 158 | } |
| 159 | - } |
|
| 160 | - else |
|
| 159 | + } else |
|
| 161 | 160 | { |
| 162 | 161 | $data = $entryFcn( $this->items, $prices, $feConfig ); |
| 163 | 162 | $included = $refFcn( $this->items ); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | unset( $attributes['service.config'] ); // don't expose private information |
| 42 | 42 | |
| 43 | 43 | $params = array( 'resource' => $type, 'id' => $id ); |
| 44 | - $basketParams = [ 'resource' => 'basket', 'id' => 'default', 'related' => 'service', 'relatedid' => $item->getType() ]; |
|
| 44 | + $basketParams = ['resource' => 'basket', 'id' => 'default', 'related' => 'service', 'relatedid' => $item->getType()]; |
|
| 45 | 45 | |
| 46 | 46 | if( isset( $fields[$type] ) ) { |
| 47 | 47 | $attributes = array_intersect_key( $attributes, $fields[$type] ); |
@@ -268,7 +268,7 @@ |
||
| 268 | 268 | $baseManager = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' ); |
| 269 | 269 | |
| 270 | 270 | $search = $baseManager->createSearch(); |
| 271 | - $search->setConditions( $search->compare( '==', 'order.base.price', '672.00') ); |
|
| 271 | + $search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) ); |
|
| 272 | 272 | |
| 273 | 273 | $items = $baseManager->searchItems( $search ); |
| 274 | 274 | |
@@ -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' ); |
@@ -244,8 +244,7 @@ |
||
| 244 | 244 | $data[] = $entryFcn( $item ); |
| 245 | 245 | $included = array_merge( $included, $refFcn( $item ) ); |
| 246 | 246 | } |
| 247 | - } |
|
| 248 | - else |
|
| 247 | + } else |
|
| 249 | 248 | { |
| 250 | 249 | $data = $entryFcn( $items ); |
| 251 | 250 | $included = $refFcn( $items ); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $first = ( $offset > 0 ? 0 : null ); |
| 90 | 90 | $prev = ( $offset - $limit >= 0 ? $offset - $limit : null ); |
| 91 | 91 | $next = ( $offset + $limit < $total ? $offset + $limit : null ); |
| 92 | -$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null ); |
|
| 92 | +$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null ); |
|
| 93 | 93 | |
| 94 | 94 | |
| 95 | 95 | $ref = array( 'resource', 'id', 'related', 'relatedid', 'filter', 'page', 'sort', 'include', 'fields' ); |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $type = $item->getResourceType(); |
| 110 | 110 | |
| 111 | 111 | $params = array( 'resource' => $type, 'id' => $id ); |
| 112 | - $basketParams = [ 'resource' => 'basket', 'id' => 'default', 'related' => 'product' ]; |
|
| 112 | + $basketParams = ['resource' => 'basket', 'id' => 'default', 'related' => 'product']; |
|
| 113 | 113 | |
| 114 | 114 | if( isset( $fields[$type] ) ) { |
| 115 | 115 | $attributes = array_intersect_key( $attributes, $fields[$type] ); |
@@ -145,8 +145,7 @@ |
||
| 145 | 145 | $data[] = $entryFcn( $attrItem ); |
| 146 | 146 | $included = array_merge( $included, $refFcn( $attrItem ) ); |
| 147 | 147 | } |
| 148 | - } |
|
| 149 | - else |
|
| 148 | + } else |
|
| 150 | 149 | { |
| 151 | 150 | $data = $entryFcn( $items ); |
| 152 | 151 | $included = $refFcn( $items ); |
@@ -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' ); |
@@ -287,7 +287,7 @@ |
||
| 287 | 287 | { |
| 288 | 288 | $total = 0; |
| 289 | 289 | $map = []; |
| 290 | - $direction = '+'; |
|
| 290 | + $direction = '+'; |
|
| 291 | 291 | |
| 292 | 292 | $ref = $view->param( 'include', [] ); |
| 293 | 293 | $size = $view->param( 'page/limit', 48 ); |
@@ -46,13 +46,11 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $status = 200; |
| 49 | - } |
|
| 50 | - catch( \Aimeos\MShop\Exception $e ) |
|
| 49 | + } catch( \Aimeos\MShop\Exception $e ) |
|
| 51 | 50 | { |
| 52 | 51 | $status = 404; |
| 53 | 52 | $view->errors = $this->getErrorDetails( $e, 'mshop' ); |
| 54 | - } |
|
| 55 | - catch( \Exception $e ) |
|
| 53 | + } catch( \Exception $e ) |
|
| 56 | 54 | { |
| 57 | 55 | $status = 500; |
| 58 | 56 | $view->errors = $this->getErrorDetails( $e ); |
@@ -81,8 +79,7 @@ discard block |
||
| 81 | 79 | */ |
| 82 | 80 | $tplconf = 'client/jsonapi/product/standard/template-aggregate'; |
| 83 | 81 | $default = 'aggregate-standard.php'; |
| 84 | - } |
|
| 85 | - else |
|
| 82 | + } else |
|
| 86 | 83 | { |
| 87 | 84 | /** client/jsonapi/product/standard/template |
| 88 | 85 | * Relative path to the product JSON API template |