Completed
Push — master ( 445306...7875eb )
by Aimeos
02:41
created
client/jsonapi/src/Client/JsonApi/Factory.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,8 +136,7 @@
 block discarded – undo
136 136
 			if( ( $client = @call_user_func_array( array( $factory, 'createClient' ), $args ) ) === false ) {
137 137
 				throw new \Aimeos\Client\JsonApi\Exception( sprintf( 'Invalid factory "%1$s"', $factory ), 400 );
138 138
 			}
139
-		}
140
-		else
139
+		} else
141 140
 		{
142 141
 			$client = self::createClientRoot( $context, $view, $templatePaths, $path, $name );
143 142
 		}
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Attribute/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/Locale/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/templates/locale/get-default.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,7 @@
 block discarded – undo
83 83
 				foreach( $items as $localeItem ) {
84 84
 					$data[] = $entryFcn( $localeItem );
85 85
 				}
86
-			}
87
-			else
86
+			} else
88 87
 			{
89 88
 				$data = $entryFcn( $items );
90 89
 			}
Please login to merge, or discard this patch.
client/jsonapi/tests/Client/JsonApi/Basket/StandardTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@
 block discarded – undo
268 268
 		$baseManager = \Aimeos\MShop\Factory::createManager( $this->context, 'order/base' );
269 269
 
270 270
 		$search = $baseManager->createSearch();
271
-		$search->setConditions( $search->compare( '==', 'order.base.price', '672.00') );
271
+		$search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) );
272 272
 
273 273
 		$items = $baseManager->searchItems( $search );
274 274
 
Please login to merge, or discard this patch.
client/jsonapi/tests/Client/JsonApi/Basket/Coupon/StandardTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -199,6 +199,9 @@
 block discarded – undo
199 199
 	}
200 200
 
201 201
 
202
+	/**
203
+	 * @param string $code
204
+	 */
202 205
 	protected function addProduct( $code )
203 206
 	{
204 207
 		$prodId = \Aimeos\MShop\Factory::createManager( $this->context, 'product' )->findItem( $code )->getId();
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Basket/Standard.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -59,16 +59,14 @@  discard block
 block discarded – undo
59 59
 			$status = 200;
60 60
 			$type = $view->param( 'id', 'default' );
61 61
 			$view->item = $this->controller->setType( $type )->clear()->get();
62
-		}
63
-		catch( \Aimeos\MShop\Exception $e )
62
+		} catch( \Aimeos\MShop\Exception $e )
64 63
 		{
65 64
 			$status = 404;
66 65
 			$view->errors = array( array(
67 66
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
68 67
 				'detail' => $e->getTraceAsString(),
69 68
 			) );
70
-		}
71
-		catch( \Exception $e )
69
+		} catch( \Exception $e )
72 70
 		{
73 71
 			$status = 500;
74 72
 			$view->errors = array( array(
@@ -99,24 +97,21 @@  discard block
 block discarded – undo
99 97
 			try
100 98
 			{
101 99
 				$view->item = $this->controller->load( $id, $this->getParts( $view ) );
102
-			}
103
-			catch( \Aimeos\MShop\Exception $e )
100
+			} catch( \Aimeos\MShop\Exception $e )
104 101
 			{
105 102
 				$view->item = $this->controller->setType( $id )->get();
106 103
 				$allow = true;
107 104
 			}
108 105
 
109 106
 			$status = 200;
110
-		}
111
-		catch( \Aimeos\MShop\Exception $e )
107
+		} catch( \Aimeos\MShop\Exception $e )
112 108
 		{
113 109
 			$status = 404;
114 110
 			$view->errors = array( array(
115 111
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
116 112
 				'detail' => $e->getTraceAsString(),
117 113
 			) );
118
-		}
119
-		catch( \Exception $e )
114
+		} catch( \Exception $e )
120 115
 		{
121 116
 			$status = 500;
122 117
 			$view->errors = array( array(
@@ -153,16 +148,14 @@  discard block
 block discarded – undo
153 148
 
154 149
 			$view->item = $basket;
155 150
 			$status = 200;
156
-		}
157
-		catch( \Aimeos\MShop\Exception $e )
151
+		} catch( \Aimeos\MShop\Exception $e )
158 152
 		{
159 153
 			$status = 404;
160 154
 			$view->errors = array( array(
161 155
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
162 156
 				'detail' => $e->getTraceAsString(),
163 157
 			) );
164
-		}
165
-		catch( \Exception $e )
158
+		} catch( \Exception $e )
166 159
 		{
167 160
 			$status = 500;
168 161
 			$view->errors = array( array(
@@ -192,16 +185,14 @@  discard block
 block discarded – undo
192 185
 
193 186
 			$view->item = $this->controller->store();
194 187
 			$status = 200;
195
-		}
196
-		catch( \Aimeos\MShop\Exception $e )
188
+		} catch( \Aimeos\MShop\Exception $e )
197 189
 		{
198 190
 			$status = 404;
199 191
 			$view->errors = array( array(
200 192
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
201 193
 				'detail' => $e->getTraceAsString(),
202 194
 			) );
203
-		}
204
-		catch( \Exception $e )
195
+		} catch( \Exception $e )
205 196
 		{
206 197
 			$status = 500;
207 198
 			$view->errors = array( array(
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Basket/Address/Standard.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,8 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 					$this->controller->setAddress( $entry->id, null );
80 80
 				}
81
-			}
82
-			else
81
+			} else
83 82
 			{
84 83
 				$this->controller->setAddress( $relId, null );
85 84
 			}
@@ -87,16 +86,14 @@  discard block
 block discarded – undo
87 86
 
88 87
 			$view->item = $this->controller->get();
89 88
 			$status = 200;
90
-		}
91
-		catch( \Aimeos\MShop\Exception $e )
89
+		} catch( \Aimeos\MShop\Exception $e )
92 90
 		{
93 91
 			$status = 404;
94 92
 			$view->errors = array( array(
95 93
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
96 94
 				'detail' => $e->getTraceAsString(),
97 95
 			) );
98
-		}
99
-		catch( \Exception $e )
96
+		} catch( \Exception $e )
100 97
 		{
101 98
 			$status = 500;
102 99
 			$view->errors = array( array(
@@ -145,16 +142,14 @@  discard block
 block discarded – undo
145 142
 
146 143
 			$view->item = $this->controller->get();
147 144
 			$status = 201;
148
-		}
149
-		catch( \Aimeos\MShop\Exception $e )
145
+		} catch( \Aimeos\MShop\Exception $e )
150 146
 		{
151 147
 			$status = 404;
152 148
 			$view->errors = array( array(
153 149
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
154 150
 				'detail' => $e->getTraceAsString(),
155 151
 			) );
156
-		}
157
-		catch( \Exception $e )
152
+		} catch( \Exception $e )
158 153
 		{
159 154
 			$status = 500;
160 155
 			$view->errors = array( array(
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Basket/Product/Standard.php 1 patch
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -78,8 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 					$this->controller->deleteProduct( $entry->id );
80 80
 				}
81
-			}
82
-			else
81
+			} else
83 82
 			{
84 83
 				$this->controller->deleteProduct( $relId );
85 84
 			}
@@ -87,16 +86,14 @@  discard block
 block discarded – undo
87 86
 
88 87
 			$view->item = $this->controller->get();
89 88
 			$status = 200;
90
-		}
91
-		catch( \Aimeos\MShop\Exception $e )
89
+		} catch( \Aimeos\MShop\Exception $e )
92 90
 		{
93 91
 			$status = 404;
94 92
 			$view->errors = array( array(
95 93
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
96 94
 				'detail' => $e->getTraceAsString(),
97 95
 			) );
98
-		}
99
-		catch( \Exception $e )
96
+		} catch( \Exception $e )
100 97
 		{
101 98
 			$status = 500;
102 99
 			$view->errors = array( array(
@@ -152,16 +149,14 @@  discard block
 block discarded – undo
152 149
 
153 150
 			$view->item = $this->controller->get();
154 151
 			$status = 200;
155
-		}
156
-		catch( \Aimeos\MShop\Exception $e )
152
+		} catch( \Aimeos\MShop\Exception $e )
157 153
 		{
158 154
 			$status = 404;
159 155
 			$view->errors = array( array(
160 156
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
161 157
 				'detail' => $e->getTraceAsString(),
162 158
 			) );
163
-		}
164
-		catch( \Exception $e )
159
+		} catch( \Exception $e )
165 160
 		{
166 161
 			$status = 500;
167 162
 			$view->errors = array( array(
@@ -218,16 +213,14 @@  discard block
 block discarded – undo
218 213
 
219 214
 			$view->item = $this->controller->get();
220 215
 			$status = 201;
221
-		}
222
-		catch( \Aimeos\MShop\Exception $e )
216
+		} catch( \Aimeos\MShop\Exception $e )
223 217
 		{
224 218
 			$status = 404;
225 219
 			$view->errors = array( array(
226 220
 				'title' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ),
227 221
 				'detail' => $e->getTraceAsString(),
228 222
 			) );
229
-		}
230
-		catch( \Exception $e )
223
+		} catch( \Exception $e )
231 224
 		{
232 225
 			$status = 500;
233 226
 			$view->errors = array( array(
Please login to merge, or discard this patch.