Passed
Push — master ( dd2043...92f5b0 )
by Aimeos
05:57
created
lib/mwlib/src/MW/Criteria/Base.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
 		if( in_array( $op, $operators['combine'], true ) ) {
71 71
 			return $this->createCombineExpression( $op, (array) $value );
72
-		}
73
-		else if( in_array( $op, $operators['compare'], true ) ) {
72
+		} else if( in_array( $op, $operators['compare'], true ) ) {
74 73
 			return $this->createCompareExpression( $op, (array) $value );
75 74
 		}
76 75
 
@@ -147,11 +146,9 @@  discard block
 block discarded – undo
147 146
 
148 147
 			if( in_array( $op, $operators['combine'], true ) ) {
149 148
 				$results[] = $this->createCombineExpression( $op, (array) $entry[$op] );
150
-			}
151
-			else if( in_array( $op, $operators['compare'], true ) ) {
149
+			} else if( in_array( $op, $operators['compare'], true ) ) {
152 150
 				$results[] = $this->createCompareExpression( $op, (array) $entry[$op] );
153
-			}
154
-			else {
151
+			} else {
155 152
 				throw new \Aimeos\MW\Common\Exception( sprintf( 'Invalid operator "%1$s"', $op ) );
156 153
 			}
157 154
 		}
Please login to merge, or discard this patch.
lib/mwlib/tests/MW/MQueue/Queue/StandardTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,7 @@
 block discarded – undo
74 74
 				SELECT * FROM mw_mqueue_test WHERE queue = ? AND cname = ? AND rtime = ?
75 75
 				ORDER BY id LIMIT 1
76 76
 			';
77
-		}
78
-		else
77
+		} else
79 78
 		{
80 79
 			$config['sql']['reserve'] = '
81 80
 				UPDATE mw_mqueue_test SET cname = ?, rtime = ? WHERE id IN (
Please login to merge, or discard this patch.
lib/mwlib/src/MW/MQueue/Standard.php 1 patch
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,9 +32,12 @@  discard block
 block discarded – undo
32 32
 	{
33 33
 		parent::__construct( $config );
34 34
 
35
-		try {
35
+		try
36
+		{
36 37
 			$this->conn = $this->createConnection();
37
-		} catch( \Aimeos\MW\DB\Exception $e ) {
38
+		}
39
+		catch( \Aimeos\MW\DB\Exception $e )
40
+		{
38 41
 			throw new \Aimeos\MW\MQueue\Exception( $e->getMessage() );
39 42
 		}
40 43
 	}
@@ -111,14 +114,12 @@  discard block
 block discarded – undo
111 114
 		{
112 115
 			$dsn .= 'Database=' . $dbase;
113 116
 			$dsn .= isset( $host ) ? ';Server=' . $host . ( isset( $port ) ? ',' . $port : '' ) : '';
114
-		}
115
-		elseif( $sock == null )
117
+		} elseif( $sock == null )
116 118
 		{
117 119
 			$dsn .= 'dbname=' . $dbase;
118 120
 			$dsn .= isset( $host ) ? ';host=' . $host : '';
119 121
 			$dsn .= isset( $port ) ? ';port=' . $port : '';
120
-		}
121
-		else
122
+		} else
122 123
 		{
123 124
 			$dsn .= 'dbname=' . $dbase . ';unix_socket=' . $sock;
124 125
 		}
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/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.