Passed
Push — master ( 03797e...f65fd3 )
by Aimeos
02:45
created
client/jsonapi/templates/attribute/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@  discard block
 block discarded – undo
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 );
@@ -130,8 +129,7 @@  discard block
 block discarded – undo
130 129
 					$data[] = $entryFcn( $item );
131 130
 					$included = array_merge( $included, $this->jincluded( $item, $fields ) );
132 131
 				}
133
-			}
134
-			else
132
+			} else
135 133
 			{
136 134
 				$data = $entryFcn( $items );
137 135
 				$included = $this->jincluded( $items, $fields );
Please login to merge, or discard this patch.
client/jsonapi/templates/catalog/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
 }
30 30
 
31 31
 
32
-$entryFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
33
-{
32
+$entryFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
34 33
 	if( $item->isAvailable() === false ) {
35 34
 		return [];
36 35
 	}
@@ -80,8 +79,7 @@  discard block
 block discarded – undo
80 79
 };
81 80
 
82 81
 
83
-$catFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item, array $entry ) use ( $target, $cntl, $action, $config )
84
-{
82
+$catFcn = function( \Aimeos\MShop\Catalog\Item\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) {
85 83
 	$params = ['resource' => 'catalog', 'id' => $item->getId()];
86 84
 	$entry['links'] = [
87 85
 		'self' => [
Please login to merge, or discard this patch.
client/jsonapi/templates/customer/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
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 );
@@ -94,8 +93,7 @@  discard block
 block discarded – undo
94 93
 };
95 94
 
96 95
 
97
-$custAddrFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item, array $entry ) use ( $target, $cntl, $action, $config )
98
-{
96
+$custAddrFcn = function( \Aimeos\MShop\Customer\Item\Address\Iface $item, array $entry ) use ( $target, $cntl, $action, $config ) {
99 97
 	$id = $item->getId();
100 98
 	$type = $item->getResourceType();
101 99
 
Please login to merge, or discard this patch.
client/jsonapi/templates/service/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
 }
28 28
 
29 29
 
30
-$entryFcn = function( \Aimeos\MShop\Service\Item\Iface $item, array $prices, array $feConfig ) use ( $fields, $target, $cntl, $action, $config )
31
-{
30
+$entryFcn = function( \Aimeos\MShop\Service\Item\Iface $item, array $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
 block discarded – undo
121 120
 					$data[] = $entryFcn( $item, $prices, $feConfig );
122 121
 					$included = array_merge( $included, $this->jincluded( $item, $fields ) );
123 122
 				}
124
-			}
125
-			else
123
+			} else
126 124
 			{
127 125
 				$data = $entryFcn( $this->items, $prices, $feConfig );
128 126
 				$included = $this->jincluded( $this->items, $fields );
Please login to merge, or discard this patch.
client/jsonapi/templates/supplier/standard.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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' );
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		"self": "<?php $params['page']['offset'] = $offset; echo $this->url( $target, $cntl, $action, $params, [], $config ); ?>"
118 118
 	}
119 119
 	<?php if( isset( $this->errors ) ) : ?>
120
-		,"errors": <?= json_encode( $this->errors, $pretty); ?>
120
+		,"errors": <?= json_encode( $this->errors, $pretty ); ?>
121 121
 
122 122
 	<?php elseif( isset( $this->items ) ) : ?>
123 123
 		<?php
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@  discard block
 block discarded – undo
37 37
 }
38 38
 
39 39
 
40
-$entryFcn = function( \Aimeos\MShop\Supplier\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
41
-{
40
+$entryFcn = function( \Aimeos\MShop\Supplier\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 );
@@ -131,8 +130,7 @@  discard block
 block discarded – undo
131 130
 					$data[] = $entryFcn( $item );
132 131
 					$included = array_merge( $included, $this->jincluded( $item, $fields ) );
133 132
 				}
134
-			}
135
-			else
133
+			} else
136 134
 			{
137 135
 				$data = $entryFcn( $items );
138 136
 				$included = $this->jincluded( $items, $fields );
Please login to merge, or discard this patch.
client/jsonapi/templates/product/standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,8 +103,7 @@  discard block
 block discarded – undo
103 103
 }
104 104
 
105 105
 
106
-$entryFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config )
107
-{
106
+$entryFcn = function( \Aimeos\MShop\Product\Item\Iface $item ) use ( $fields, $target, $cntl, $action, $config ) {
108 107
 	$id = $item->getId();
109 108
 	$attributes = $item->toArray();
110 109
 	$type = $item->getResourceType();
@@ -197,8 +196,7 @@  discard block
 block discarded – undo
197 196
 					$data[] = $entryFcn( $item );
198 197
 					$included = array_merge( $included, $this->jincluded( $item, $fields ) );
199 198
 				}
200
-			}
201
-			else
199
+			} else
202 200
 			{
203 201
 				$data = $entryFcn( $items );
204 202
 				$included = $this->jincluded( $items, $fields );
Please login to merge, or discard this patch.