Passed
Pull Request — master (#255)
by Laurent
06:00
created
lib/mwlib/src/MW/DB/Statement/DBAL/Prepared.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,9 +71,12 @@
 block discarded – undo
71 71
 	 */
72 72
 	public function execute() : \Aimeos\MW\DB\Result\Iface
73 73
 	{
74
-		try {
74
+		try
75
+		{
75 76
 			$stmt = $this->exec();
76
-		} catch( \PDOException $e ) {
77
+		}
78
+		catch( \PDOException $e )
79
+		{
77 80
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql . map( $this->binds )->col( 0 )->toJson(), $e->getCode() );
78 81
 		}
79 82
 
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/Process/Pcntl.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,9 +110,12 @@
 block discarded – undo
110 110
 			throw new Exception( 'Unable to fork new process: ' . pcntl_strerror( pcntl_get_last_error() ) );
111 111
 		}
112 112
 
113
-		if( $pid === 0 ) // child process
113
+		if( $pid === 0 ) {
114
+			// child process
114 115
 		{
115
-			$this->list = []; // use own child process list
116
+			$this->list = [];
117
+		}
118
+		// use own child process list
116 119
 			exit( $this->exec( $fcn, $data ) );
117 120
 		}
118 121
 
Please login to merge, or discard this patch.
lib/mshoplib/setup/StockMigrateProductId.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,8 +82,7 @@  discard block
 block discarded – undo
82 82
 			{
83 83
 				$this->executeList( $this->updates );
84 84
 				$this->status( 'done' );
85
-			}
86
-			else
85
+			} else
87 86
 			{
88 87
 				$this->status( 'OK' );
89 88
 			}
@@ -96,8 +95,7 @@  discard block
 block discarded – undo
96 95
 			{
97 96
 				$this->execute( $this->column );
98 97
 				$this->status( 'done' );
99
-			}
100
-			else
98
+			} else
101 99
 			{
102 100
 				$this->status( 'OK' );
103 101
 			}
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.
controller/common/src/Controller/Common/Media/Standard.php 3 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,9 @@  discard block
 block discarded – undo
107 107
 					$fs->copy( $preview, $newPath );
108 108
 					$previews[$size] = $newPath;
109 109
 				}
110
-				catch( \Aimeos\MW\Filesystem\Exception $e ) {} // mime icons can't be copied
110
+				catch( \Aimeos\MW\Filesystem\Exception $e )
111
+				{
112
+} // mime icons can't be copied
111 113
 			}
112 114
 		}
113 115
 
@@ -369,7 +371,9 @@  discard block
 block discarded – undo
369 371
 					$fs->rm( $preview );
370 372
 				}
371 373
 			}
372
-			catch( \Exception $e ) { ; } // continue if removing file fails
374
+			catch( \Exception $e )
375
+			{
376
+; } // continue if removing file fails
373 377
 		}
374 378
 
375 379
 		return $item->setPreviews( [] );
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -454,7 +454,7 @@
 block discarded – undo
454 454
 		$siteId = $this->context->getLocale()->getSiteId();
455 455
 
456 456
 		// the "d" after {siteid} is the required extension for Windows (no dots at the and allowed)
457
-		return "${siteId}d/${type}/${filename[0]}/${filename[1]}/${filename}${ext}";
457
+		return "${siteid}d/${type}/${filename[0]}/${filename[1]}/${filename}${ext}";
458 458
 	}
459 459
 
460 460
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 
388 388
 		$previews = $item->getPreviews();
389 389
 		// don't delete first (smallest) image because it's referenced in past orders
390
-		if ( 'product' === $item->getDomain() ) {
390
+		if( 'product' === $item->getDomain() ) {
391 391
 			$previews = array_slice( $previews, 1 );
392 392
 		}
393 393
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 					$fs->rm( $preview );
400 400
 				}
401 401
 			}
402
-			catch( \Exception $e ) { ; } // continue if removing file fails
402
+			catch( \Exception $e ) {; } // continue if removing file fails
403 403
 		}
404 404
 
405 405
 		return $item->setPreviews( [] );
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Config/Decorator/Memory.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,8 +103,7 @@
 block discarded – undo
103 103
 		{
104 104
 			$this->cache[$name] = $value;
105 105
 			unset( $this->negCache[$name] );
106
-		}
107
-		else
106
+		} else
108 107
 		{
109 108
 			$this->negCache[$name] = true;
110 109
 		}
Please login to merge, or discard this patch.