Passed
Pull Request — master (#255)
by Laurent
06:00
created
lib/mwlib/src/MW/Str.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -214,9 +214,12 @@
 block discarded – undo
214 214
 	{
215 215
 		if( self::$node === null )
216 216
 		{
217
-			try {
217
+			try
218
+			{
218 219
 				self::$node = random_bytes( 6 );
219
-			} catch( \Throwable $t ) {
220
+			}
221
+			catch( \Throwable $t )
222
+			{
220 223
 				if( function_exists( 'openssl_random_pseudo_bytes' ) ) {
221 224
 					self::$node = openssl_random_pseudo_bytes( 6 );
222 225
 				} else {
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Index/Manager/Text/SQLSrv.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@
 block discarded – undo
60 60
 			$sort = 'mindte_ft.RANK';
61 61
 
62 62
 			$func = $this->getFunctionRelevance();
63
-		}
64
-		else
63
+		} else
65 64
 		{
66 65
 			$search = ':site AND mindte."langid" = $1 AND CHARINDEX( $2, content )';
67 66
 			$sort = '-CHARINDEX( $2, content )';
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Index/Manager/DBBase.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -306,8 +306,7 @@
 block discarded – undo
306 306
 		if( empty( $search->getSortations() ) && ( $attribute = reset( $attributes ) ) !== false )
307 307
 		{
308 308
 			$search = ( clone $search )->setSortations( [$search->sort( '+', $attribute->getCode() )] );
309
-		}
310
-		elseif( !empty( $search->getSortations() ) )
309
+		} elseif( !empty( $search->getSortations() ) )
311 310
 		{
312 311
 			$names = $search->translate( $search->getSortations(), [], $funcs );
313 312
 			$cols = $search->translate( $search->getSortations(), $translations, $funcs );
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Service/Provider/Decorator/Country.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,8 +117,7 @@
 block discarded – undo
117 117
 					return false;
118 118
 				}
119 119
 			}
120
-		}
121
-		elseif( ( $addresses = $basket->getAddress( Address\Base::TYPE_PAYMENT ) ) !== [] )
120
+		} elseif( ( $addresses = $basket->getAddress( Address\Base::TYPE_PAYMENT ) ) !== [] )
122 121
 		{
123 122
 			// use billing address if no delivery address is available
124 123
 			foreach( $addresses as $address )
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Common/Manager/Base.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -305,8 +305,7 @@  discard block
 block discarded – undo
305 305
 			foreach( $columns as $name ) {
306 306
 				$names .= '"' . $name . '", '; $values .= '?, ';
307 307
 			}
308
-		}
309
-		else
308
+		} else
310 309
 		{
311 310
 			foreach( $columns as $name ) {
312 311
 				$names .= '"' . $name . '" = ?, ';
@@ -691,11 +690,9 @@  discard block
 block discarded – undo
691 690
 
692 691
 		if( isset( $attributes[$prefix] ) && $attributes[$prefix] instanceof $iface ) {
693 692
 			return $attributes[$prefix]->getInternalDeps();
694
-		}
695
-		elseif( isset( $attributes[$name] ) && $attributes[$name] instanceof $iface ) {
693
+		} elseif( isset( $attributes[$name] ) && $attributes[$name] instanceof $iface ) {
696 694
 			return $attributes[$name]->getInternalDeps();
697
-		}
698
-		else if( isset( $attributes['id'] ) && $attributes['id'] instanceof $iface ) {
695
+		} else if( isset( $attributes['id'] ) && $attributes['id'] instanceof $iface ) {
699 696
 			return $attributes['id']->getInternalDeps();
700 697
 		}
701 698
 
Please login to merge, or discard this patch.
lib/mwlib/src/MW/DB/Manager/PDO.php 1 patch
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -110,7 +110,8 @@  discard block
 block discarded – undo
110 110
 
111 111
 			return array_pop( $this->connections[$name] );
112 112
 		}
113
-		catch( \PDOException $e ) {
113
+		catch( \PDOException $e )
114
+		{
114 115
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );
115 116
 		}
116 117
 	}
@@ -160,14 +161,12 @@  discard block
 block discarded – undo
160 161
 			{
161 162
 				$dsn .= 'Database=' . $dbase;
162 163
 				$dsn .= isset( $host ) ? ';Server=' . $host . ( isset( $port ) ? ',' . $port : '' ) : '';
163
-			}
164
-			elseif( $sock == null )
164
+			} elseif( $sock == null )
165 165
 			{
166 166
 				$dsn .= 'dbname=' . $dbase;
167 167
 				$dsn .= isset( $host ) ? ';host=' . $host : '';
168 168
 				$dsn .= isset( $port ) ? ';port=' . $port : '';
169
-			}
170
-			else
169
+			} else
171 170
 			{
172 171
 				$dsn .= 'dbname=' . $dbase . ';unix_socket=' . $sock;
173 172
 			}
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/DemoAddCatalogData.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,9 @@  discard block
 block discarded – undo
66 66
 			$this->removeItems( $item->getId(), 'catalog/lists', 'catalog', 'text' );
67 67
 			$this->removeListItems( $item->getId(), 'catalog/lists', 'product' );
68 68
 		}
69
-		catch( \Exception $e ) {; } // If no root node was already inserted into the database
69
+		catch( \Exception $e )
70
+		{
71
+; } // If no root node was already inserted into the database
70 72
 
71 73
 		$search = $manager->filter();
72 74
 		$search->setConditions( $search->compare( '=~', 'catalog.code', 'demo-' ) );
@@ -106,8 +108,7 @@  discard block
 block discarded – undo
106 108
 			}
107 109
 
108 110
 			$this->status( 'added' );
109
-		}
110
-		else
111
+		} else
111 112
 		{
112 113
 			$this->status( 'removed' );
113 114
 		}
Please login to merge, or discard this patch.
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.