Passed
Push — master ( ee351f...ab24ac )
by Aimeos
06:15
created
lib/mshoplib/src/MShop/Catalog/Manager/Standard.php 1 patch
Braces   +13 added lines, -10 removed lines patch added patch discarded remove patch
@@ -721,9 +721,12 @@  discard block
 block discarded – undo
721 721
 
722 722
 		foreach( $sitePath as $siteId )
723 723
 		{
724
-			try {
724
+			try
725
+			{
725 726
 				$path = $this->createTreeManager( $siteId )->getPath( $id );
726
-			} catch( \Exception $e ) {
727
+			}
728
+			catch( \Exception $e )
729
+			{
727 730
 				continue;
728 731
 			}
729 732
 
@@ -759,9 +762,12 @@  discard block
 block discarded – undo
759 762
 
760 763
 		foreach( $sitePath as $siteId )
761 764
 		{
762
-			try {
765
+			try
766
+			{
763 767
 				$node = $this->createTreeManager( $siteId )->getNode( $id, $level, $criteria );
764
-			} catch( \Aimeos\MW\Tree\Exception $e ) {
768
+			}
769
+			catch( \Aimeos\MW\Tree\Exception $e )
770
+			{
765 771
 				continue;
766 772
 			}
767 773
 
@@ -842,8 +848,7 @@  discard block
 block discarded – undo
842 848
 				if( $child->getParentId() !== $item->getParentId() ) {
843 849
 					$this->move( $child->getId(), $item->getParentId(), $child->getParentId() );
844 850
 				}
845
-			}
846
-			else
851
+			} else
847 852
 			{
848 853
 				$this->insert( $child, $item->getId() );
849 854
 			}
@@ -1002,8 +1007,7 @@  discard block
 block discarded – undo
1002 1007
 				 */
1003 1008
 				$path = 'mshop/catalog/manager/update-usage';
1004 1009
 				$sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ), false );
1005
-			}
1006
-			else
1010
+			} else
1007 1011
 			{
1008 1012
 				/** mshop/catalog/manager/insert-usage/mysql
1009 1013
 				 * Updates the config, editor, ctime and mtime value of an inserted record
@@ -1067,8 +1071,7 @@  discard block
 block discarded – undo
1067 1071
 			{
1068 1072
 				$stmt->bind( $idx++, $siteid );
1069 1073
 				$stmt->bind( $idx++, $id, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
1070
-			}
1071
-			else
1074
+			} else
1072 1075
 			{
1073 1076
 				$stmt->bind( $idx++, $date ); // ctime
1074 1077
 				$stmt->bind( $idx++, $siteid );
Please login to merge, or discard this patch.
lib/mwlib/src/MW/DB/Statement/PDO/Prepared.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,9 +72,12 @@
 block discarded – undo
72 72
 	 */
73 73
 	public function execute() : \Aimeos\MW\DB\Result\Iface
74 74
 	{
75
-		try {
75
+		try
76
+		{
76 77
 			$stmt = $this->exec();
77
-		} catch( \PDOException $e ) {
78
+		}
79
+		catch( \PDOException $e )
80
+		{
78 81
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql . map( $this->binds )->col( 0 )->toJson(), $e->getCode(), $e->errorInfo );
79 82
 		}
80 83
 
Please login to merge, or discard this patch.
lib/mshoplib/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.
lib/mshoplib/src/MShop/Rule/Manager/Standard.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -378,8 +378,7 @@
 block discarded – undo
378 378
 				 */
379 379
 				$path = 'mshop/rule/manager/insert';
380 380
 				$sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) );
381
-			}
382
-			else
381
+			} else
383 382
 			{
384 383
 				/** mshop/rule/manager/update/mysql
385 384
 				 * Updates an existing rule record in the database
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Media/Factory.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,25 +38,21 @@
 block discarded – undo
38 38
 			if( ( $content = stream_get_contents( $file ) ) === false ) {
39 39
 				throw new \Aimeos\MW\Media\Exception( sprintf( 'Unable to read from stream' ) );
40 40
 			}
41
-		}
42
-		elseif( $file instanceof \Psr\Http\Message\StreamInterface )
41
+		} elseif( $file instanceof \Psr\Http\Message\StreamInterface )
43 42
 		{
44 43
 			$content = $file->getContents();
45
-		}
46
-		elseif( is_string( $file ) )
44
+		} elseif( is_string( $file ) )
47 45
 		{
48 46
 			if( strpos( $file, "\0" ) === false && is_file( $file ) )
49 47
 			{
50 48
 				if( ( $content = file_get_contents( $file ) ) === false ) {
51 49
 					throw new \Aimeos\MW\Media\Exception( sprintf( 'Unable to read from file "%1$s"', $file ) );
52 50
 				}
53
-			}
54
-			else
51
+			} else
55 52
 			{
56 53
 				$content = $file;
57 54
 			}
58
-		}
59
-		else
55
+		} else
60 56
 		{
61 57
 			throw new \Aimeos\MW\Media\Exception( 'Unsupported file parameter type' );
62 58
 		}
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Index/Manager/Supplier/Standard.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -463,7 +463,7 @@
 block discarded – undo
463 463
 
464 464
 						try {
465 465
 							$stmt->execute()->finish();
466
-						} catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates
466
+						} catch( \Aimeos\MW\DB\Exception $e ) {; } // Ignore duplicates
467 467
 					}
468 468
 				}
469 469
 			}
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -497,9 +497,13 @@
 block discarded – undo
497 497
 						$stmt->bind( 7, $date ); //mtime
498 498
 						$stmt->bind( 8, $siteid );
499 499
 
500
-						try {
500
+						try
501
+						{
501 502
 							$stmt->execute()->finish();
502
-						} catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates
503
+						}
504
+						catch( \Aimeos\MW\DB\Exception $e )
505
+						{
506
+; } // Ignore duplicates
503 507
 					}
504 508
 				}
505 509
 			}
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/MShopAddCatalogDataDefault.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,9 +46,12 @@
 block discarded – undo
46 46
 
47 47
 		foreach( $data as $entry )
48 48
 		{
49
-			try {
49
+			try
50
+			{
50 51
 				$manager->find( $entry['catalog.code'] );
51
-			} catch( \Aimeos\MW\Exception $e ) {
52
+			}
53
+			catch( \Aimeos\MW\Exception $e )
54
+			{
52 55
 				$manager->insert( $manager->create()->fromArray( $entry ) );
53 56
 			}
54 57
 		}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Media/Image/Standard.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -196,8 +196,7 @@  discard block
 block discarded – undo
196 196
 			$ratio = ( $w < $h ? $width / $w : $height / $h );
197 197
 			$newHeight = (int) $h * $ratio;
198 198
 			$newWidth = (int) $w * $ratio;
199
-		}
200
-		else
199
+		} else
201 200
 		{
202 201
 			list( $newWidth, $newHeight ) = $this->getSizeFitted( $w, $h, $width, $height );
203 202
 
@@ -261,8 +260,7 @@  discard block
 block discarded – undo
261 260
 
262 261
 			imagedestroy( $result );
263 262
 			$newMedia->image = $newImage;
264
-		}
265
-		else
263
+		} else
266 264
 		{
267 265
 			$newMedia->image = $result;
268 266
 		}
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
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 				$item = $item->setId( null )->fromArray( $dataset );
51 51
 				$manager->save( $item );
52 52
 			}
53
-			catch( \Exception $e ) { ; } // if attribute was already available
53
+			catch( \Exception $e ) {; } // if attribute was already available
54 54
 		}
55 55
 	}
56 56
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@
 block discarded – undo
50 50
 				$item = $item->setId( null )->fromArray( $dataset );
51 51
 				$manager->save( $item );
52 52
 			}
53
-			catch( \Exception $e ) { ; } // if attribute was already available
53
+			catch( \Exception $e )
54
+			{
55
+; } // if attribute was already available
54 56
 		}
55 57
 	}
56 58
 }
Please login to merge, or discard this patch.