Passed
Push — master ( 5788d1...3b28d2 )
by Aimeos
04:17
created
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.
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.
src/MShop/Customer/Manager/Group/Standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -305,8 +305,7 @@
 block discarded – undo
305 305
 				 */
306 306
 				$path = 'mshop/customer/manager/group/insert';
307 307
 				$sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) );
308
-			}
309
-			else
308
+			} else
310 309
 			{
311 310
 				/** mshop/customer/manager/group/update/mysql
312 311
 				 * Updates an existing customer group record in the database
Please login to merge, or discard this patch.
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.
src/MShop/Common/Manager/ListsRef/Traits.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -178,8 +178,7 @@  discard block
 block discarded – undo
178 178
 						$search->compare( '==', $prefix . '.lists.domain', $key ),
179 179
 						$search->compare( '==', $prefix . '.lists.type', $domain ),
180 180
 					] );
181
-				}
182
-				else
181
+				} else
183 182
 				{
184 183
 					$list[] = $search->compare( '==', $prefix . '.lists.domain', $domain );
185 184
 				}
@@ -187,8 +186,7 @@  discard block
 block discarded – undo
187 186
 
188 187
 			$expr[] = $search->or( $list );
189 188
 			$search->setConditions( $search->and( $expr ) );
190
-		}
191
-		else
189
+		} else
192 190
 		{
193 191
 			$search->setConditions( $search->compare( '==', $prefix . '.lists.parentid', $ids ) );
194 192
 		}
Please login to merge, or discard this patch.
setup/MShopAddLocaleData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
 
165 165
 			try {
166 166
 				$localeManager->save( $item );
167
-			} catch( \Aimeos\Base\DB\Exception $e ) { ; } // if locale combination was already available
167
+			} catch( \Aimeos\Base\DB\Exception $e ) {; } // if locale combination was already available
168 168
 		}
169 169
 	}
170 170
 }
Please login to merge, or discard this patch.
Braces   +19 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,9 +52,12 @@  discard block
 block discarded – undo
52 52
 		$localeManager = \Aimeos\MShop::create( $this->context(), 'locale', 'Standard' );
53 53
 		$siteManager = $localeManager->getSubManager( 'site' );
54 54
 
55
-		try {
55
+		try
56
+		{
56 57
 			$siteItem = $siteManager->insert( $siteManager->create()->setLabel( $code )->setCode( $code ) );
57
-		} catch( \Aimeos\Base\DB\Exception $e ) {
58
+		}
59
+		catch( \Aimeos\Base\DB\Exception $e )
60
+		{
58 61
 			$siteItem = $siteManager->find( $code );
59 62
 		}
60 63
 
@@ -69,7 +72,9 @@  discard block
 block discarded – undo
69 72
 
70 73
 			$localeManager->save( $localeItem, false );
71 74
 		}
72
-		catch( \Aimeos\Base\DB\Exception $e ) {} // already in the database
75
+		catch( \Aimeos\Base\DB\Exception $e )
76
+		{
77
+} // already in the database
73 78
 	}
74 79
 
75 80
 
@@ -91,9 +96,12 @@  discard block
 block discarded – undo
91 96
 
92 97
 		foreach( $data as $key => $dataset )
93 98
 		{
94
-			try {
99
+			try
100
+			{
95 101
 				$item = $manager->insert( $manager->create()->fromArray( $dataset ), $parentId );
96
-			} catch( \Aimeos\Base\DB\Exception $e ) {
102
+			}
103
+			catch( \Aimeos\Base\DB\Exception $e )
104
+			{
97 105
 				$item = $manager->find( $key );
98 106
 			}
99 107
 
@@ -162,9 +170,13 @@  discard block
 block discarded – undo
162 170
 				->set( 'site_id', $siteIds[$dataset['site']]['id'] )
163 171
 				->setSiteId( $siteIds[$dataset['site']]['site'] );
164 172
 
165
-			try {
173
+			try
174
+			{
166 175
 				$localeManager->save( $item );
167
-			} catch( \Aimeos\Base\DB\Exception $e ) { ; } // if locale combination was already available
176
+			}
177
+			catch( \Aimeos\Base\DB\Exception $e )
178
+			{
179
+; } // if locale combination was already available
168 180
 		}
169 181
 	}
170 182
 }
Please login to merge, or discard this patch.
setup/unitperf/CatalogAddPerfData.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@  discard block
 block discarded – undo
61 61
 				for( $i = 0; $i < $numCatPerLevel; $i++ ) {
62 62
 					$treeFcn( $parents, $catItem->getId(), $numCatPerLevel, $level - 1, $catLabel . '-' . ( $i + 1 ), $i );
63 63
 				}
64
-			}
65
-			else
64
+			} else
66 65
 			{
67 66
 				$fcn = function( array $parents, $catLabel ) {
68 67
 
@@ -120,9 +119,12 @@  discard block
 block discarded – undo
120 119
 
121 120
 		while( true )
122 121
 		{
123
-			try {
122
+			try
123
+			{
124 124
 				return $catalogManager->insert( $item, $parentId );
125
-			} catch( \Aimeos\Base\DB\Exception $e ) {
125
+			}
126
+			catch( \Aimeos\Base\DB\Exception $e )
127
+			{
126 128
 				if( $e->getCode() !== 40001 ) { throw $e; } // transaction deadlock
127 129
 			}
128 130
 		}
Please login to merge, or discard this patch.
src/MShop/Catalog/Manager/Standard.php 1 patch
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -718,9 +718,12 @@  discard block
 block discarded – undo
718 718
 
719 719
 		foreach( $sitePath as $siteId )
720 720
 		{
721
-			try {
721
+			try
722
+			{
722 723
 				$path = $this->createTreeManager( $siteId )->getPath( $id );
723
-			} catch( \Exception $e ) {
724
+			}
725
+			catch( \Exception $e )
726
+			{
724 727
 				continue;
725 728
 			}
726 729
 
@@ -757,9 +760,12 @@  discard block
 block discarded – undo
757 760
 
758 761
 		foreach( $sitePath as $siteId )
759 762
 		{
760
-			try {
763
+			try
764
+			{
761 765
 				$node = $this->createTreeManager( $siteId )->getNode( $id, $level, $criteria );
762
-			} catch( \Aimeos\MW\Tree\Exception $e ) {
766
+			}
767
+			catch( \Aimeos\MW\Tree\Exception $e )
768
+			{
763 769
 				continue;
764 770
 			}
765 771
 
@@ -841,8 +847,7 @@  discard block
 block discarded – undo
841 847
 				if( $child->getParentId() !== $item->getParentId() ) {
842 848
 					$this->move( $child->getId(), $item->getParentId(), $child->getParentId() );
843 849
 				}
844
-			}
845
-			else
850
+			} else
846 851
 			{
847 852
 				$this->insert( $child, $item->getId() );
848 853
 			}
@@ -1001,8 +1006,7 @@  discard block
 block discarded – undo
1001 1006
 				 */
1002 1007
 				$path = 'mshop/catalog/manager/update-usage';
1003 1008
 				$sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ), false );
1004
-			}
1005
-			else
1009
+			} else
1006 1010
 			{
1007 1011
 				/** mshop/catalog/manager/insert-usage/mysql
1008 1012
 				 * Updates the config, editor, ctime and mtime value of an inserted record
@@ -1066,8 +1070,7 @@  discard block
 block discarded – undo
1066 1070
 			{
1067 1071
 				$stmt->bind( $idx++, $siteid );
1068 1072
 				$stmt->bind( $idx++, $id, \Aimeos\Base\DB\Statement\Base::PARAM_INT );
1069
-			}
1070
-			else
1073
+			} else
1071 1074
 			{
1072 1075
 				$stmt->bind( $idx++, $date ); // ctime
1073 1076
 				$stmt->bind( $idx++, $siteid );
Please login to merge, or discard this patch.
src/MShop/Index/Manager/Attribute/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -701,7 +701,7 @@
 block discarded – undo
701 701
 
702 702
 				try {
703 703
 					$stmt->execute()->finish();
704
-				} catch( \Aimeos\Base\DB\Exception $e ) { ; } // Ignore duplicates
704
+				} catch( \Aimeos\Base\DB\Exception $e ) {; } // Ignore duplicates
705 705
 			}
706 706
 		}
707 707
 	}
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -699,9 +699,13 @@
 block discarded – undo
699 699
 				$stmt->bind( 7, $date ); // mtime
700 700
 				$stmt->bind( 8, $siteid );
701 701
 
702
-				try {
702
+				try
703
+				{
703 704
 					$stmt->execute()->finish();
704
-				} catch( \Aimeos\Base\DB\Exception $e ) { ; } // Ignore duplicates
705
+				}
706
+				catch( \Aimeos\Base\DB\Exception $e )
707
+				{
708
+; } // Ignore duplicates
705 709
 			}
706 710
 		}
707 711
 	}
Please login to merge, or discard this patch.