@@ -24,8 +24,7 @@ discard block |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | |
27 | -$entryFcn = function( \Aimeos\MShop\Subscription\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
28 | -{ |
|
27 | +$entryFcn = function( \Aimeos\MShop\Subscription\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
29 | 28 | $id = $item->getId(); |
30 | 29 | $attributes = $item->toArray(); |
31 | 30 | $type = $item->getResourceType(); |
@@ -85,8 +84,7 @@ discard block |
||
85 | 84 | foreach( $items as $item ) { |
86 | 85 | $data[] = $entryFcn( $item ); |
87 | 86 | } |
88 | - } |
|
89 | - else |
|
87 | + } else |
|
90 | 88 | { |
91 | 89 | $data = $entryFcn( $items ); |
92 | 90 | } |
@@ -36,8 +36,11 @@ |
||
36 | 36 | <?php if( isset( $this->errors ) ) : ?> |
37 | 37 | "errors": <?= json_encode( $this->errors, JSON_PRETTY_PRINT ); ?> |
38 | 38 | |
39 | - <?php else : ?> |
|
40 | - "data": <?= json_encode( $entries ); ?> |
|
39 | + <?php else { |
|
40 | + : ?> |
|
41 | + "data": <?= json_encode( $entries ); |
|
42 | +} |
|
43 | +?> |
|
41 | 44 | |
42 | 45 | <?php endif; ?> |
43 | 46 | } |
@@ -29,8 +29,7 @@ discard block |
||
29 | 29 | } |
30 | 30 | |
31 | 31 | |
32 | -$entryFcn = function( \Aimeos\MShop\Locale\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
33 | -{ |
|
32 | +$entryFcn = function( \Aimeos\MShop\Locale\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
34 | 33 | $id = $item->getId(); |
35 | 34 | $attributes = $item->toArray(); |
36 | 35 | $type = $item->getResourceType(); |
@@ -98,8 +97,7 @@ discard block |
||
98 | 97 | foreach( $items as $localeItem ) { |
99 | 98 | $data[] = $entryFcn( $localeItem ); |
100 | 99 | } |
101 | - } |
|
102 | - else |
|
100 | + } else |
|
103 | 101 | { |
104 | 102 | $data = $entryFcn( $items ); |
105 | 103 | } |
@@ -37,8 +37,7 @@ discard block |
||
37 | 37 | } |
38 | 38 | |
39 | 39 | |
40 | -$entryFcn = function( \Aimeos\MShop\Attribute\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
41 | -{ |
|
40 | +$entryFcn = function( \Aimeos\MShop\Attribute\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
42 | 41 | $id = $item->getId(); |
43 | 42 | $type = $item->getResourceType(); |
44 | 43 | $params = array( 'resource' => $type, 'id' => $id ); |
@@ -129,8 +128,7 @@ discard block |
||
129 | 128 | foreach( $items as $item ) { |
130 | 129 | $data[] = $entryFcn( $item ); |
131 | 130 | } |
132 | - } |
|
133 | - else |
|
131 | + } else |
|
134 | 132 | { |
135 | 133 | $data = $entryFcn( $items ); |
136 | 134 | } |
@@ -27,8 +27,7 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | |
30 | -$entryFcn = function( \Aimeos\MShop\Service\Item\Iface $item, \Aimeos\Map $prices, array $feConfig ) use ( $fields, $target, $cntl, $action, $config ) |
|
31 | -{ |
|
30 | +$entryFcn = function( \Aimeos\MShop\Service\Item\Iface $item, \Aimeos\Map $prices, array $feConfig ) use ( $fields, $target, $cntl, $action, $config ) { |
|
32 | 31 | $metadata = []; |
33 | 32 | $id = $item->getId(); |
34 | 33 | $type = $item->getResourceType(); |
@@ -121,8 +120,7 @@ discard block |
||
121 | 120 | foreach( $items as $item ) { |
122 | 121 | $data[] = $entryFcn( $item, $prices, $feConfig ); |
123 | 122 | } |
124 | - } |
|
125 | - else |
|
123 | + } else |
|
126 | 124 | { |
127 | 125 | $data = $entryFcn( $items, $prices, $feConfig ); |
128 | 126 | } |
@@ -27,8 +27,7 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | |
30 | -$entryFcn = function( \Aimeos\MShop\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
31 | -{ |
|
30 | +$entryFcn = function( \Aimeos\MShop\Review\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
32 | 31 | $relid = $item->getId(); |
33 | 32 | $type = 'review'; |
34 | 33 | $attributes = $item->toArray(); |
@@ -86,8 +85,7 @@ discard block |
||
86 | 85 | foreach( $items as $item ) { |
87 | 86 | $data[] = $entryFcn( $item ); |
88 | 87 | } |
89 | - } |
|
90 | - else |
|
88 | + } else |
|
91 | 89 | { |
92 | 90 | $data = $entryFcn( $items ); |
93 | 91 | } |
@@ -27,8 +27,7 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | |
30 | -$entryFcn = function( \Aimeos\MShop\Common\Item\Lists\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
31 | -{ |
|
30 | +$entryFcn = function( \Aimeos\MShop\Common\Item\Lists\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
32 | 31 | $relid = $item->getId(); |
33 | 32 | $id = $item->getParentId(); |
34 | 33 | $attributes = $item->toArray(); |
@@ -86,8 +85,7 @@ discard block |
||
86 | 85 | foreach( $items as $item ) { |
87 | 86 | $data[] = $entryFcn( $item ); |
88 | 87 | } |
89 | - } |
|
90 | - else |
|
88 | + } else |
|
91 | 89 | { |
92 | 90 | $data = $entryFcn( $items ); |
93 | 91 | } |
@@ -27,8 +27,7 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | |
30 | -$entryFcn = function( \Aimeos\MShop\Customer\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
31 | -{ |
|
30 | +$entryFcn = function( \Aimeos\MShop\Customer\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
32 | 31 | $id = $item->getId(); |
33 | 32 | $type = $item->getResourceType(); |
34 | 33 | $params = array( 'resource' => $type, 'id' => $id ); |
@@ -91,8 +90,7 @@ discard block |
||
91 | 90 | }; |
92 | 91 | |
93 | 92 | |
94 | -$custAddrFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) |
|
95 | -{ |
|
93 | +$custAddrFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) { |
|
96 | 94 | $params = ['resource' => 'customer', 'id' => $item->getParentId(), 'related' => 'address', 'relatedid' => $item->getId()]; |
97 | 95 | $basketParams = ['resource' => 'basket', 'id' => 'default', 'related' => 'address', 'relatedid' => 'payment']; |
98 | 96 | |
@@ -111,8 +109,7 @@ discard block |
||
111 | 109 | }; |
112 | 110 | |
113 | 111 | |
114 | -$custPropFcn = function( \Aimeos\MShop\Common\Item\Property\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) |
|
115 | -{ |
|
112 | +$custPropFcn = function( \Aimeos\MShop\Common\Item\Property\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) { |
|
116 | 113 | $params = ['resource' => 'customer', 'id' => $item->getParentId(), 'related' => 'property', 'relatedid' => $item->getId()]; |
117 | 114 | |
118 | 115 | $entry['links'] = [ |
@@ -25,8 +25,7 @@ discard block |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | |
28 | -$entryFcn = function( \Aimeos\MShop\Common\Item\Property\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) |
|
29 | -{ |
|
28 | +$entryFcn = function( \Aimeos\MShop\Common\Item\Property\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) { |
|
30 | 29 | $id = $item->getId(); |
31 | 30 | $attributes = $item->toArray(); |
32 | 31 | $type = $item->getResourceType(); |
@@ -85,8 +84,7 @@ discard block |
||
85 | 84 | foreach( $items as $propItem ) { |
86 | 85 | $data[] = $entryFcn( $propItem ); |
87 | 86 | } |
88 | - } |
|
89 | - else |
|
87 | + } else |
|
90 | 88 | { |
91 | 89 | $data = $entryFcn( $items ); |
92 | 90 | } |