@@ -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] ); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $first = ( $offset > 0 ? 0 : null ); |
| 98 | 98 | $prev = ( $offset - $limit >= 0 ? $offset - $limit : null ); |
| 99 | 99 | $next = ( $offset + $limit < $total ? $offset + $limit : null ); |
| 100 | -$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null ); |
|
| 100 | +$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null ); |
|
| 101 | 101 | |
| 102 | 102 | |
| 103 | 103 | $map = $this->get( 'itemMap', array() ); |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $type = $item->getResourceType(); |
| 116 | 116 | |
| 117 | 117 | $params = array( 'resource' => $type, 'id' => $id ); |
| 118 | - $basketParams = [ 'resource' => 'basket', 'id' => 'default', 'related' => 'product' ]; |
|
| 118 | + $basketParams = ['resource' => 'basket', 'id' => 'default', 'related' => 'product']; |
|
| 119 | 119 | |
| 120 | 120 | if( isset( $fields[$type] ) ) { |
| 121 | 121 | $attributes = array_intersect_key( $attributes, $fields[$type] ); |