Passed
Push — master ( c9773b...29143b )
by Aimeos
05:44
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->find( $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->find( $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.
controller/common/src/Controller/Common/Order/Standard.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -349,7 +349,8 @@
 block discarded – undo
349 349
 				{
350 350
 					$stockManager->decrease( [$item->getProductId() => $how * -1 * $item->getQuantity()], $item->getStockType() );
351 351
 
352
-					switch( $item->getType() ) {
352
+					switch( $item->getType() )
353
+					{
353 354
 						case 'default':
354 355
 							$this->updateStockBundle( $item->getProductId(), $item->getStockType() ); break;
355 356
 						case 'select':
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Stock/Manager/Nolimit.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,8 +140,7 @@
 block discarded – undo
140 140
 			foreach( $cond->getExpressions() as $expr ) {
141 141
 				$list = array_merge( $list, $this->getProductIds( $expr ) );
142 142
 			}
143
-		}
144
-		elseif( $cond instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface )
143
+		} elseif( $cond instanceof \Aimeos\MW\Criteria\Expression\Compare\Iface )
145 144
 		{
146 145
 			if( $cond->getName() === 'stock.productid' && $cond->getOperator() === '==' ) {
147 146
 				$list = array_merge( $list, (array) $cond->getValue() );
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddPluginData.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,10 +97,14 @@
 block discarded – undo
97 97
 				$item->setPosition( $dataset['position'] );
98 98
 			}
99 99
 
100
-			try {
100
+			try
101
+			{
101 102
 				$pluginManager->save( $item );
102 103
 				$num++;
103
-			} catch( \Exception $e ) {; } // if plugin configuration was already available
104
+			}
105
+			catch( \Exception $e )
106
+			{
107
+; } // if plugin configuration was already available
104 108
 		}
105 109
 
106 110
 		$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddTypeData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 				try {
82 82
 					$domainManager->save( $type );
83 83
 					$num++;
84
-				} catch( \Exception $e ) { ; } // if type was already available
84
+				} catch( \Exception $e ) {; } // if type was already available
85 85
 			}
86 86
 
87 87
 			$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,10 +78,14 @@
 block discarded – undo
78 78
 				$type->setLabel( $dataset['label'] );
79 79
 				$type->setStatus( $dataset['status'] );
80 80
 
81
-				try {
81
+				try
82
+				{
82 83
 					$domainManager->save( $type );
83 84
 					$num++;
84
-				} catch( \Exception $e ) { ; } // if type was already available
85
+				}
86
+				catch( \Exception $e )
87
+				{
88
+; } // if type was already available
85 89
 			}
86 90
 
87 91
 			$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
Please login to merge, or discard this patch.
lib/mshoplib/setup/MShopAddAttributeData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 				$manager->save( $item );
56 56
 				$num++;
57 57
 			}
58
-			catch( \Exception $e ) { ; } // if attribute was already available
58
+			catch( \Exception $e ) {; } // if attribute was already available
59 59
 		}
60 60
 
61 61
 		$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,9 @@
 block discarded – undo
55 55
 				$manager->save( $item );
56 56
 				$num++;
57 57
 			}
58
-			catch( \Exception $e ) { ; } // if attribute was already available
58
+			catch( \Exception $e )
59
+			{
60
+; } // if attribute was already available
59 61
 		}
60 62
 
61 63
 		$this->status( $num > 0 ? $num . '/' . $total : 'OK' );
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->save( $manager->create()->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.
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->save( $groupManager->create()->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/setup/MShopAddDataAbstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,8 +89,7 @@
 block discarded – undo
89 89
 
90 90
 				$attrManager->save( $item );
91 91
 				$id = $item->getId();
92
-			}
93
-			else
92
+			} else
94 93
 			{
95 94
 				$id = $attrItem->getId();
96 95
 			}
Please login to merge, or discard this patch.