Completed
Push — master ( 38a76c...92e547 )
by Aimeos
02:18
created
client/jsonapi/src/Client/JsonApi/Base.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,6 @@
 block discarded – undo
115 115
 	 *
116 116
 	 * @param \Psr\Http\Message\ServerRequestInterface $request Request object
117 117
 	 * @param \Psr\Http\Message\ResponseInterface $response Response object
118
-	 * @param string|null $prefix Form parameter prefix when nesting parameters is required
119 118
 	 * @return \Psr\Http\Message\ResponseInterface Modified response object
120 119
 	 */
121 120
 	public function put( ServerRequestInterface $request, ResponseInterface $response )
Please login to merge, or discard this patch.
client/jsonapi/templates/product/get-default.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -231,8 +231,7 @@
 block discarded – undo
231 231
 					$data[] = $entryFcn( $productItem );
232 232
 					$included = array_merge( $included, $refFcn( $productItem, 0 ) );
233 233
 				}
234
-			}
235
-			else
234
+			} else
236 235
 			{
237 236
 				$data = $entryFcn( $items );
238 237
 				$included = $refFcn( $items, 0 );
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 $first = ( $offset > 0 ? 0 : null );
99 99
 $prev = ( $offset - $limit >= 0 ? $offset - $limit : null );
100 100
 $next = ( $offset + $limit < $total ? $offset + $limit : null );
101
-$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null );
101
+$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null );
102 102
 
103 103
 
104 104
 $map = $this->get( 'itemMap', array() );
Please login to merge, or discard this patch.
client/jsonapi/templates/stock/get-default.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@
 block discarded – undo
105 105
 				foreach( $items as $stockId => $stockItem ) {
106 106
 					$data[] = $entryFcn( $stockItem );
107 107
 				}
108
-			}
109
-			else
108
+			} else
110 109
 			{
111 110
 				$data = $entryFcn( $items );
112 111
 			}
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 $first = ( $offset > 0 ? 0 : null );
34 34
 $prev = ( $offset - $limit >= 0 ? $offset - $limit : null );
35 35
 $next = ( $offset + $limit < $total ? $offset + $limit : null );
36
-$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null );
36
+$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null );
37 37
 
38 38
 
39 39
 $fields = $this->param( 'fields', array() );
Please login to merge, or discard this patch.
client/jsonapi/templates/aggregate-default.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,12 @@
 block discarded – undo
20 20
 
21 21
 		"errors": <?php echo json_encode( $this->errors, JSON_PRETTY_PRINT ); ?>
22 22
 
23
-	<?php else : ?>
23
+	<?php else {
24
+	: ?>
24 25
 
25
-		"data": <?php echo json_encode( $entries ); ?>
26
+		"data": <?php echo json_encode( $entries );
27
+}
28
+?>
26 29
 
27 30
 	<?php endif; ?>
28 31
 }
Please login to merge, or discard this patch.
client/jsonapi/templates/attribute/get-default.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -152,8 +152,7 @@
 block discarded – undo
152 152
 					$data[] = $entryFcn( $attrItem );
153 153
 					$included = array_merge( $included, $refFcn( $attrItem, 0 ) );
154 154
 				}
155
-			}
156
-			else
155
+			} else
157 156
 			{
158 157
 				$data = $entryFcn( $items );
159 158
 				$included = $refFcn( $items, 0 );
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 $first = ( $offset > 0 ? 0 : null );
34 34
 $prev = ( $offset - $limit >= 0 ? $offset - $limit : null );
35 35
 $next = ( $offset + $limit < $total ? $offset + $limit : null );
36
-$last = ( ((int) ($total / $limit)) * $limit > $offset ? ((int) ($total / $limit)) * $limit : null );
36
+$last = ( ( (int) ( $total / $limit ) ) * $limit > $offset ? ( (int) ( $total / $limit ) ) * $limit : null );
37 37
 
38 38
 
39 39
 $fields = $this->param( 'fields', array() );
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Catalog/Standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,16 +39,14 @@
 block discarded – undo
39 39
 		{
40 40
 			$response = $this->getItem( $view, $request, $response );
41 41
 			$status = 200;
42
-		}
43
-		catch( \Aimeos\MShop\Exception $e )
42
+		} catch( \Aimeos\MShop\Exception $e )
44 43
 		{
45 44
 			$status = 404;
46 45
 			$view->errors = array( array(
47 46
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
48 47
 				'detail' => $e->getTraceAsString(),
49 48
 			) );
50
-		}
51
-		catch( \Exception $e )
49
+		} catch( \Exception $e )
52 50
 		{
53 51
 			$status = 500;
54 52
 			$view->errors = array( array(
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Common/Factory/Base.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@
 block discarded – undo
101 101
 				$decorators = $config->get( 'client/jsonapi/' . $dpath . 'decorators/local', array() );
102 102
 				$client = self::addDecorators( $client, $decorators, $classprefix, $context, $view, $templatePaths, $path );
103 103
 			}
104
-		}
105
-		else
104
+		} else
106 105
 		{
107 106
 			$classprefix = '\\Aimeos\\Client\\JsonApi\\Common\\Decorator\\';
108 107
 			$client = self::addDecorators( $client, $decorators, $classprefix, $context, $view, $templatePaths, $path );
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 	/**
41 41
 	 * Adds the decorators to the JSON API client object
42 42
 	 *
43
-	 * @param \Aimeos\Client\JsonApi\Common\Iface $client Client object
43
+	 * @param \Aimeos\Client\JsonApi\Iface $client Client object
44 44
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
45 45
 	 * @param \Aimeos\MW\View\Iface $view View object
46 46
 	 * @param array $templatePaths List of file system paths where the templates are stored
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Stock/Standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,16 +44,14 @@
 block discarded – undo
44 44
 			}
45 45
 
46 46
 			$status = 200;
47
-		}
48
-		catch( \Aimeos\MShop\Exception $e )
47
+		} catch( \Aimeos\MShop\Exception $e )
49 48
 		{
50 49
 			$status = 404;
51 50
 			$view->errors = array( array(
52 51
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
53 52
 				'detail' => $e->getTraceAsString(),
54 53
 			) );
55
-		}
56
-		catch( \Exception $e )
54
+		} catch( \Exception $e )
57 55
 		{
58 56
 			$status = 500;
59 57
 			$view->errors = array( array(
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Product/Standard.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,16 +46,14 @@  discard block
 block discarded – undo
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 = array( array(
54 53
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
55 54
 				'detail' => $e->getTraceAsString(),
56 55
 			) );
57
-		}
58
-		catch( \Exception $e )
56
+		} catch( \Exception $e )
59 57
 		{
60 58
 			$status = 500;
61 59
 			$view->errors = array( array(
@@ -87,8 +85,7 @@  discard block
 block discarded – undo
87 85
 			 */
88 86
 			$tplconf = 'client/jsonapi/product/standard/template-aggregate';
89 87
 			$default = 'aggregate-default.php';
90
-		}
91
-		else
88
+		} else
92 89
 		{
93 90
 			/** client/jsonapi/product/standard/template-get
94 91
 			 * Relative path to the product JSON API template for GET requests
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@
 block discarded – undo
296 296
 	{
297 297
 		$total = 0;
298 298
 		$map = array();
299
-		$direction  = '+';
299
+		$direction = '+';
300 300
 
301 301
 		$ref = $view->param( 'include', array() );
302 302
 		$size = $view->param( 'page/limit', 48 );
Please login to merge, or discard this patch.