Completed
Push — master ( 8a1a97...7caa83 )
by Aimeos
02:38
created
client/jsonapi/src/Client/JsonApi/Product/Standard.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,13 +46,11 @@  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 = $this->getErrorDetails( $e, 'mshop' );
54
-		}
55
-		catch( \Exception $e )
53
+		} catch( \Exception $e )
56 54
 		{
57 55
 			$status = 500;
58 56
 			$view->errors = $this->getErrorDetails( $e );
@@ -81,8 +79,7 @@  discard block
 block discarded – undo
81 79
 			 */
82 80
 			$tplconf = 'client/jsonapi/product/standard/template-aggregate';
83 81
 			$default = 'aggregate-standard';
84
-		}
85
-		else
82
+		} else
86 83
 		{
87 84
 			/** client/jsonapi/product/standard/template
88 85
 			 * Relative path to the product JSON API template
Please login to merge, or discard this patch.
client/jsonapi/tests/Client/JsonApi/Common/Factory/BaseTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -123,6 +123,9 @@
 block discarded – undo
123 123
 	}
124 124
 
125 125
 
126
+	/**
127
+	 * @param string $name
128
+	 */
126 129
 	protected function access( $name )
127 130
 	{
128 131
 		$class = new \ReflectionClass( \Aimeos\Client\JsonApi\Common\Factory\Base::class );
Please login to merge, or discard this patch.
client/jsonapi/tests/Client/JsonApi/Order/StandardTest.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -351,6 +351,9 @@
 block discarded – undo
351 351
 	}
352 352
 
353 353
 
354
+	/**
355
+	 * @param string $name
356
+	 */
354 357
 	protected function access( $name )
355 358
 	{
356 359
 		$class = new \ReflectionClass( \Aimeos\Client\JsonApi\Order\Standard::class );
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -374,7 +374,7 @@
 block discarded – undo
374 374
 		$baseManager = \Aimeos\MShop::create( $this->context, 'order/base' );
375 375
 
376 376
 		$search = $baseManager->createSearch();
377
-		$search->setConditions( $search->compare( '==', 'order.base.price', '672.00') );
377
+		$search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) );
378 378
 
379 379
 		$items = $baseManager->searchItems( $search );
380 380
 
Please login to merge, or discard this patch.
client/jsonapi/tests/TestHelperJapi.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -84,6 +84,9 @@
 block discarded – undo
84 84
 	}
85 85
 
86 86
 
87
+	/**
88
+	 * @param string $site
89
+	 */
87 90
 	private static function createContext( $site )
88 91
 	{
89 92
 		$ctx = new \Aimeos\MShop\Context\Item\Standard();
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
@@ -374,7 +374,7 @@
 block discarded – undo
374 374
 		$baseManager = \Aimeos\MShop::create( $this->context, 'order/base' );
375 375
 
376 376
 		$search = $baseManager->createSearch();
377
-		$search->setConditions( $search->compare( '==', 'order.base.price', '672.00') );
377
+		$search->setConditions( $search->compare( '==', 'order.base.price', '672.00' ) );
378 378
 
379 379
 		$items = $baseManager->searchItems( $search );
380 380
 
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Customer/Standard.php 1 patch
Braces   +12 added lines, -24 removed lines patch added patch discarded remove patch
@@ -40,18 +40,15 @@  discard block
 block discarded – undo
40 40
 			$cntl = \Aimeos\Controller\Frontend::create( $this->getContext(), 'customer' );
41 41
 			$cntl->deleteItem( $view->param( 'id' ) );
42 42
 			$status = 200;
43
-		}
44
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
43
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
45 44
 		{
46 45
 			$status = 403;
47 46
 			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
48
-		}
49
-		catch( \Aimeos\MShop\Exception $e )
47
+		} catch( \Aimeos\MShop\Exception $e )
50 48
 		{
51 49
 			$status = 404;
52 50
 			$view->errors = $this->getErrorDetails( $e, 'mshop' );
53
-		}
54
-		catch( \Exception $e )
51
+		} catch( \Exception $e )
55 52
 		{
56 53
 			$status = 500;
57 54
 			$view->errors = $this->getErrorDetails( $e );
@@ -84,18 +81,15 @@  discard block
 block discarded – undo
84 81
 
85 82
 			$view->item = $cntl->getItem( $view->param( 'id' ), $ref );
86 83
 			$status = 200;
87
-		}
88
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
84
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
89 85
 		{
90 86
 			$status = 403;
91 87
 			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
92
-		}
93
-		catch( \Aimeos\MShop\Exception $e )
88
+		} catch( \Aimeos\MShop\Exception $e )
94 89
 		{
95 90
 			$status = 404;
96 91
 			$view->errors = $this->getErrorDetails( $e, 'mshop' );
97
-		}
98
-		catch( \Exception $e )
92
+		} catch( \Exception $e )
99 93
 		{
100 94
 			$status = 500;
101 95
 			$view->errors = $this->getErrorDetails( $e );
@@ -128,18 +122,15 @@  discard block
 block discarded – undo
128 122
 
129 123
 			$view->item = $cntl->editItem( $view->param( 'id' ), (array) $payload->data->attributes );
130 124
 			$status = 200;
131
-		}
132
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
125
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
133 126
 		{
134 127
 			$status = 403;
135 128
 			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
136
-		}
137
-		catch( \Aimeos\MShop\Exception $e )
129
+		} catch( \Aimeos\MShop\Exception $e )
138 130
 		{
139 131
 			$status = 404;
140 132
 			$view->errors = $this->getErrorDetails( $e, 'mshop' );
141
-		}
142
-		catch( \Exception $e )
133
+		} catch( \Exception $e )
143 134
 		{
144 135
 			$status = 500;
145 136
 			$view->errors = $this->getErrorDetails( $e );
@@ -173,18 +164,15 @@  discard block
 block discarded – undo
173 164
 			$view->item = $cntl->addItem( (array) $payload->data->attributes );
174 165
 			$view->nodata = true; // only expose customer ID to attackers
175 166
 			$status = 201;
176
-		}
177
-		catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
167
+		} catch( \Aimeos\Controller\Frontend\Customer\Exception $e )
178 168
 		{
179 169
 			$status = 403;
180 170
 			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
181
-		}
182
-		catch( \Aimeos\MShop\Exception $e )
171
+		} catch( \Aimeos\MShop\Exception $e )
183 172
 		{
184 173
 			$status = 404;
185 174
 			$view->errors = $this->getErrorDetails( $e, 'mshop' );
186
-		}
187
-		catch( \Exception $e )
175
+		} catch( \Exception $e )
188 176
 		{
189 177
 			$status = 500;
190 178
 			$view->errors = $this->getErrorDetails( $e );
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
 			if( ( $client = @call_user_func_array( [$factory, 'create'], [$context, $path, $name] ) ) === false ) {
60 60
 				throw new \Aimeos\Client\JsonApi\Exception( sprintf( 'Invalid factory "%1$s"', $factory ), 400 );
61 61
 			}
62
-		}
63
-		else
62
+		} else
64 63
 		{
65 64
 			$client = self::createRoot( $context, $path, $name );
66 65
 		}
Please login to merge, or discard this patch.
client/jsonapi/src/Client/JsonApi/Subscription/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 			else
88 88
 			{
89 89
 				$total = 0;
90
-				$items = $cntl->slice( $view->param( 'page/offset', 0), $view->param( 'page/limit', 25 ) )
90
+				$items = $cntl->slice( $view->param( 'page/offset', 0 ), $view->param( 'page/limit', 25 ) )
91 91
 					->sort( $view->param( 'sort' ) )->parse( $view->param( 'filter', [] ) )->search( $total );
92 92
 
93 93
 				$view->items = $items;
Please login to merge, or discard this patch.
Braces   +7 added lines, -14 removed lines patch added patch discarded remove patch
@@ -43,18 +43,15 @@  discard block
 block discarded – undo
43 43
 			$view->total = 1;
44 44
 
45 45
 			$status = 200;
46
-		}
47
-		catch( \Aimeos\Controller\Frontend\Exception $e )
46
+		} catch( \Aimeos\Controller\Frontend\Exception $e )
48 47
 		{
49 48
 			$status = 403;
50 49
 			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
51
-		}
52
-		catch( \Aimeos\MShop\Exception $e )
50
+		} catch( \Aimeos\MShop\Exception $e )
53 51
 		{
54 52
 			$status = 404;
55 53
 			$view->errors = $this->getErrorDetails( $e, 'mshop' );
56
-		}
57
-		catch( \Exception $e )
54
+		} catch( \Exception $e )
58 55
 		{
59 56
 			$status = 500;
60 57
 			$view->errors = $this->getErrorDetails( $e );
@@ -83,8 +80,7 @@  discard block
 block discarded – undo
83 80
 			{
84 81
 				$view->items = $cntl->get( $id );
85 82
 				$view->total = 1;
86
-			}
87
-			else
83
+			} else
88 84
 			{
89 85
 				$total = 0;
90 86
 				$items = $cntl->slice( $view->param( 'page/offset', 0), $view->param( 'page/limit', 25 ) )
@@ -95,18 +91,15 @@  discard block
 block discarded – undo
95 91
 			}
96 92
 
97 93
 			$status = 200;
98
-		}
99
-		catch( \Aimeos\Controller\Frontend\Exception $e )
94
+		} catch( \Aimeos\Controller\Frontend\Exception $e )
100 95
 		{
101 96
 			$status = 403;
102 97
 			$view->errors = $this->getErrorDetails( $e, 'controller/frontend' );
103
-		}
104
-		catch( \Aimeos\MShop\Exception $e )
98
+		} catch( \Aimeos\MShop\Exception $e )
105 99
 		{
106 100
 			$status = 404;
107 101
 			$view->errors = $this->getErrorDetails( $e, 'mshop' );
108
-		}
109
-		catch( \Exception $e )
102
+		} catch( \Exception $e )
110 103
 		{
111 104
 			$status = 500;
112 105
 			$view->errors = $this->getErrorDetails( $e );
Please login to merge, or discard this patch.