Passed
Push — master ( 8bcf0d...10ee87 )
by Aimeos
06:29
created
lib/mshoplib/setup/default/DemoAddProductData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@
 block discarded – undo
173 173
 					$manager = \Aimeos\MShop::create( $context, 'attribute' );
174 174
 					$refItem = $manager->findItem( $refItem->getCode(), [], $domain, $refItem->getType() );
175 175
 				}
176
-				catch( \Aimeos\MShop\Exception $e ) { ; } // attribute doesn't exist yet
176
+				catch( \Aimeos\MShop\Exception $e ) {; } // attribute doesn't exist yet
177 177
 
178 178
 				$refItem = $this->addRefItems( $refItem, $data );
179 179
 				$item->addListItem( 'attribute', $listItem, $refItem );
Please login to merge, or discard this patch.
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,8 +81,7 @@  discard block
 block discarded – undo
81 81
 		{
82 82
 			$this->addDemoData();
83 83
 			$this->status( 'added' );
84
-		}
85
-		else
84
+		} else
86 85
 		{
87 86
 			$this->status( 'removed' );
88 87
 		}
@@ -173,7 +172,9 @@  discard block
 block discarded – undo
173 172
 					$manager = \Aimeos\MShop::create( $context, 'attribute' );
174 173
 					$refItem = $manager->findItem( $refItem->getCode(), [], $domain, $refItem->getType() );
175 174
 				}
176
-				catch( \Aimeos\MShop\Exception $e ) { ; } // attribute doesn't exist yet
175
+				catch( \Aimeos\MShop\Exception $e )
176
+				{
177
+; } // attribute doesn't exist yet
177 178
 
178 179
 				$refItem = $this->addRefItems( $refItem, $data );
179 180
 				$item->addListItem( 'attribute', $listItem, $refItem );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Plugin/Provider/Order/ProductLimit.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -133,8 +133,7 @@
 block discarded – undo
133 133
 				$this->checkWithoutCurrency( $order, $entry );
134 134
 				$this->checkWithCurrency( $order, $entry );
135 135
 			}
136
-		}
137
-		else
136
+		} else
138 137
 		{
139 138
 			\Aimeos\MW\Common\Base::checkClass( \Aimeos\MShop\Order\Item\Base\Product\Iface::class, $value );
140 139
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Weight.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,9 +96,11 @@
 block discarded – undo
96 96
 			$code = $orderProduct->getProductCode();
97 97
 			$prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty );
98 98
 
99
-			foreach( $orderProduct->getProducts() as $prodItem ) // calculate bundled products
99
+			foreach( $orderProduct->getProducts() as $prodItem ) {
100
+				// calculate bundled products
100 101
 			{
101 102
 				$qty = $prodItem->getQuantity();
103
+			}
102 104
 				$code = $prodItem->getProductCode();
103 105
 				$prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty );
104 106
 			}
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Postal.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,12 +119,13 @@
 block discarded – undo
119 119
 					return false;
120 120
 				}
121 121
 			}
122
-		}
123
-		elseif( ( $addresses = $basket->getAddress( $paymentType ) ) !== [] ) // use billing address if no delivery address is available
122
+		} elseif( ( $addresses = $basket->getAddress( $paymentType ) ) !== [] ) {
123
+			// use billing address if no delivery address is available
124 124
 		{
125 125
 			foreach( $addresses as $address )
126 126
 			{
127 127
 				$code = $address->getPostal();
128
+		}
128 129
 
129 130
 				if( $this->checkPostalCode( $code, 'postal.delivery-include' ) === false
130 131
 					|| $this->checkPostalCode( $code, 'postal.delivery-exclude' ) === true
Please login to merge, or discard this patch.
lib/mshoplib/setup/LocaleRemoveCharConstraints.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,8 +53,7 @@  discard block
 block discarded – undo
53 53
 		) {
54 54
 			$this->execute( 'ALTER TABLE "mshop_locale" DROP FOREIGN KEY "fk_msloc_langid"', 'db-locale' );
55 55
 			$this->status( 'done' );
56
-		}
57
-		else
56
+		} else
58 57
 		{
59 58
 			$this->status( 'OK' );
60 59
 		}
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
 		) {
67 66
 			$this->execute( 'ALTER TABLE "mshop_locale" DROP FOREIGN KEY "fk_msloc_currid"', 'db-locale' );
68 67
 			$this->status( 'done' );
69
-		}
70
-		else
68
+		} else
71 69
 		{
72 70
 			$this->status( 'OK' );
73 71
 		}
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/CustomerAddTestData.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,9 +142,13 @@
 block discarded – undo
142 142
 		{
143 143
 			foreach( $data['customer/group'] as $entry )
144 144
 			{
145
-				try {
145
+				try
146
+				{
146 147
 					$groupManager->saveItem( $groupManager->createItem()->fromArray( $entry ), false );
147
-				} catch( \Exception $e ) { echo $e->getMessage(); } // ignore duplicates
148
+				}
149
+				catch( \Exception $e )
150
+				{
151
+echo $e->getMessage(); } // ignore duplicates
148 152
 			}
149 153
 		}
150 154
 	}
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Plugin/Provider/ExceptionTest.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
 	public function test()
28 28
 	{
29
-		try {
29
+		try
30
+		{
30 31
 			throw new \Aimeos\MShop\Plugin\Provider\Exception( 'msg', 13, null, $this->codes );
31 32
 		}
32 33
 		catch( \Aimeos\MShop\Plugin\Provider\Exception $mppe )
@@ -36,7 +37,8 @@  discard block
 block discarded – undo
36 37
 			$this->assertEquals( $this->codes, $mppe->getErrorCodes() );
37 38
 		}
38 39
 
39
-		try {
40
+		try
41
+		{
40 42
 			throw new \Aimeos\MShop\Plugin\Provider\Exception( 'msg2', 11 );
41 43
 		}
42 44
 		catch( \Aimeos\MShop\Plugin\Provider\Exception $e )
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/PriceListAddTestData.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,9 @@
 block discarded – undo
206 206
 
207 207
 				$listTypeManager->saveItem( $listItemType );
208 208
 			}
209
-			catch( \Exception $e ) {} // Duplicate entry
209
+			catch( \Exception $e )
210
+			{
211
+} // Duplicate entry
210 212
 		}
211 213
 	}
212 214
 }
Please login to merge, or discard this patch.
lib/mshoplib/setup/unittest/BaseAddTestData.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -173,9 +173,13 @@
 block discarded – undo
173 173
 
174 174
 				foreach( $testdata[$domain] as $entry )
175 175
 				{
176
-					try {
176
+					try
177
+					{
177 178
 						$manager->saveItem( $manager->createItem()->fromArray( $entry ), false );
178
-					} catch( \Exception $e ) {} // Duplicate entry
179
+					}
180
+					catch( \Exception $e )
181
+					{
182
+} // Duplicate entry
179 183
 				}
180 184
 			}
181 185
 		}
Please login to merge, or discard this patch.