@@ -21,8 +21,7 @@ discard block |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | |
24 | -$build = function( \Aimeos\MShop\Catalog\Item\Iface $item, \Aimeos\Map $listItems ) use ( $fields ) |
|
25 | -{ |
|
24 | +$build = function( \Aimeos\MShop\Catalog\Item\Iface $item, \Aimeos\Map $listItems ) use ( $fields ) { |
|
26 | 25 | $id = $item->getId(); |
27 | 26 | $type = $item->getResourceType(); |
28 | 27 | $params = array( 'resource' => $type, 'id' => $id ); |
@@ -85,12 +84,10 @@ discard block |
||
85 | 84 | foreach( $data as $item ) { |
86 | 85 | $response[] = $build( $item, $listItems ); |
87 | 86 | } |
88 | -} |
|
89 | -elseif( $data !== null ) |
|
87 | +} elseif( $data !== null ) |
|
90 | 88 | { |
91 | 89 | $response = $build( $data, $listItems ); |
92 | -} |
|
93 | -else |
|
90 | +} else |
|
94 | 91 | { |
95 | 92 | $response = null; |
96 | 93 | } |
@@ -21,8 +21,7 @@ discard block |
||
21 | 21 | } |
22 | 22 | |
23 | 23 | |
24 | -$build = function( \Aimeos\MShop\Locale\Item\Site\Iface $item ) use ( $fields ) |
|
25 | -{ |
|
24 | +$build = function( \Aimeos\MShop\Locale\Item\Site\Iface $item ) use ( $fields ) { |
|
26 | 25 | $id = $item->getId(); |
27 | 26 | $type = $item->getResourceType(); |
28 | 27 | $params = array( 'resource' => $type, 'id' => $id ); |
@@ -66,12 +65,10 @@ discard block |
||
66 | 65 | foreach( $data as $item ) { |
67 | 66 | $response[] = $build( $item ); |
68 | 67 | } |
69 | -} |
|
70 | -elseif( $data !== null ) |
|
68 | +} elseif( $data !== null ) |
|
71 | 69 | { |
72 | 70 | $response = $build( $data ); |
73 | -} |
|
74 | -else |
|
71 | +} else |
|
75 | 72 | { |
76 | 73 | $response = null; |
77 | 74 | } |