Completed
Push — master ( 222791...8272bb )
by Aimeos
02:51
created
client/jsonapi/tests/Client/JsonApi/Customer/Relationships/StandardTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		$typeManager = \Aimeos\MShop\Factory::createManager( $this->context, 'customer/lists/type' );
40 40
 
41 41
 		$userId = $custManager->findItem( 'UTC001' )->getId();
42
-		$typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId();;
42
+		$typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId(); ;
43 43
 
44 44
 		$this->context->setUserId( $userId );
45 45
 		$item = $manager->createItem()->setParentId( $userId );
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		$typeManager = \Aimeos\MShop\Factory::createManager( $this->context, 'customer/lists/type' );
75 75
 
76 76
 		$userId = $custManager->findItem( 'UTC001' )->getId();
77
-		$typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId();;
77
+		$typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId(); ;
78 78
 
79 79
 		$this->context->setUserId( $userId );
80 80
 		$item = $manager->createItem()->setParentId( $userId );
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 		$typeManager = \Aimeos\MShop\Factory::createManager( $this->context, 'customer/lists/type' );
271 271
 
272 272
 		$userId = $custManager->findItem( 'UTC001' )->getId();
273
-		$typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId();;
273
+		$typeId = $typeManager->findItem( 'favorite', [], 'product' )->getId(); ;
274 274
 
275 275
 		$this->context->setUserId( $userId );
276 276
 		$item = $manager->createItem()->setParentId( $userId );
Please login to merge, or discard this patch.
client/jsonapi/templates/customer/relationships/standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@
 block discarded – undo
101 101
 				foreach( $items as $item ) {
102 102
 					$data[] = $entryFcn( $item );
103 103
 				}
104
-			}
105
-			else
104
+			} else
106 105
 			{
107 106
 				$data = $entryFcn( $items );
108 107
 			}
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Customer/Relationships/Standard.php 1 patch
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -79,25 +79,21 @@  discard block
 block discarded – undo
79 79
 
80 80
 					$this->controller->deleteListsItem( $entry->id );
81 81
 				}
82
-			}
83
-			else
82
+			} else
84 83
 			{
85 84
 				$this->controller->deleteListsItem( $relId );
86 85
 			}
87 86
 
88 87
 			$status = 200;
89
-		}
90
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
88
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
91 89
 		{
92 90
 			$status = 403;
93 91
 			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
94
-		}
95
-		catch( \Aimeos\MShop\Exception $e )
92
+		} catch( \Aimeos\MShop\Exception $e )
96 93
 		{
97 94
 			$status = 404;
98 95
 			$view->errors = $this->getErrorDetails( $e, 'mshop' );
99
-		}
100
-		catch( \Exception $e )
96
+		} catch( \Exception $e )
101 97
 		{
102 98
 			$status = 500;
103 99
 			$view->errors = $this->getErrorDetails( $e );
@@ -130,26 +126,22 @@  discard block
 block discarded – undo
130 126
 			{
131 127
 				$filter = $this->initCriteria( $cntl->createListsFilter(), $view->param( 'filter', [] ) );
132 128
 				$view->items = $cntl->searchListsItems( $filter, $total );
133
-			}
134
-			else
129
+			} else
135 130
 			{
136 131
 				$view->items = $cntl->getListsItem( $relId );
137 132
 			}
138 133
 
139 134
 			$view->total = $total;
140 135
 			$status = 200;
141
-		}
142
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
136
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
143 137
 		{
144 138
 			$status = 403;
145 139
 			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
146
-		}
147
-		catch( \Aimeos\MShop\Exception $e )
140
+		} catch( \Aimeos\MShop\Exception $e )
148 141
 		{
149 142
 			$status = 404;
150 143
 			$view->errors = $this->getErrorDetails( $e, 'mshop' );
151
-		}
152
-		catch( \Exception $e )
144
+		} catch( \Exception $e )
153 145
 		{
154 146
 			$status = 500;
155 147
 			$view->errors = $this->getErrorDetails( $e );
@@ -185,19 +177,16 @@  discard block
 block discarded – undo
185 177
 			$view->items = $cntl->editListsItem( $view->param( 'relatedid' ), (array) $payload->data->attributes );
186 178
 			$view->total = 1;
187 179
 			$status = 200;
188
-		}
189
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
180
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
190 181
 		{
191 182
 print_r( $e->getMessage() );
192 183
 			$status = 403;
193 184
 			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
194
-		}
195
-		catch( \Aimeos\MShop\Exception $e )
185
+		} catch( \Aimeos\MShop\Exception $e )
196 186
 		{
197 187
 			$status = 404;
198 188
 			$view->errors = $this->getErrorDetails( $e, 'mshop' );
199
-		}
200
-		catch( \Exception $e )
189
+		} catch( \Exception $e )
201 190
 		{
202 191
 			$status = 500;
203 192
 			$view->errors = $this->getErrorDetails( $e );
@@ -246,18 +235,15 @@  discard block
 block discarded – undo
246 235
 			$view->total = count( $list );
247 236
 			$view->items = $list;
248 237
 			$status = 201;
249
-		}
250
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
238
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
251 239
 		{
252 240
 			$status = 403;
253 241
 			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
254
-		}
255
-		catch( \Aimeos\MShop\Exception $e )
242
+		} catch( \Aimeos\MShop\Exception $e )
256 243
 		{
257 244
 			$status = 404;
258 245
 			$view->errors = $this->getErrorDetails( $e, 'mshop' );
259
-		}
260
-		catch( \Exception $e )
246
+		} catch( \Exception $e )
261 247
 		{
262 248
 			$status = 500;
263 249
 			$view->errors = $this->getErrorDetails( $e );
Please login to merge, or discard this patch.