Passed
Push — master ( 8261fc...d6c380 )
by Aimeos
05:31
created
lib/mwlib/src/MW/DB/Statement/DBAL/Simple.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,9 +69,12 @@
 block discarded – undo
69 69
 	 */
70 70
 	public function execute() : \Aimeos\MW\DB\Result\Iface
71 71
 	{
72
-		try {
72
+		try
73
+		{
73 74
 			$result = $this->getConnection()->getRawObject()->getWrappedConnection()->query( $this->sql );
74
-		} catch( \Doctrine\DBAL\Driver\Exception $e ) {
75
+		}
76
+		catch( \Doctrine\DBAL\Driver\Exception $e )
77
+		{
75 78
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage() . ': ' . $this->sql, $e->getCode() );
76 79
 		}
77 80
 
Please login to merge, or discard this patch.
lib/mwlib/src/MW/DB/Statement/DBAL/Prepared.php 2 patches
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
 			$result = $this->exec();
76
-		} catch( \Doctrine\DBAL\Driver\Exception $e ) {
77
+		}
78
+		catch( \Doctrine\DBAL\Driver\Exception $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.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		switch( $type )
118 118
 		{
119 119
 			case \Aimeos\MW\DB\Statement\Base::PARAM_NULL:
120
-				$dbaltype = \Doctrine\DBAL\ParameterType::NULL; break;
120
+				$dbaltype = \Doctrine\DBAL\ParameterType::null; break;
121 121
 			case \Aimeos\MW\DB\Statement\Base::PARAM_BOOL:
122 122
 				$dbaltype = \Doctrine\DBAL\ParameterType::BOOLEAN; break;
123 123
 			case \Aimeos\MW\DB\Statement\Base::PARAM_INT:
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 		}
134 134
 
135 135
 		if( is_null( $value ) ) {
136
-			$dbaltype = \Doctrine\DBAL\ParameterType::NULL;
136
+			$dbaltype = \Doctrine\DBAL\ParameterType::null;
137 137
 		}
138 138
 
139 139
 		return $dbaltype;
Please login to merge, or discard this patch.
lib/mwlib/src/MW/DB/Result/DBAL.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,9 +50,12 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public function affectedRows() : int
52 52
 	{
53
-		try {
53
+		try
54
+		{
54 55
 			return $this->result->rowCount();
55
-		} catch( \Doctrine\DBAL\Driver\Exception $e ) {
56
+		}
57
+		catch( \Doctrine\DBAL\Driver\Exception $e )
58
+		{
56 59
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode() );
57 60
 		}
58 61
 	}
@@ -90,9 +93,12 @@  discard block
 block discarded – undo
90 93
 	 */
91 94
 	public function finish() : Iface
92 95
 	{
93
-		try {
96
+		try
97
+		{
94 98
 			$this->result->free();
95
-		} catch( \Doctrine\DBAL\Driver\Exception $e ) {
99
+		}
100
+		catch( \Doctrine\DBAL\Driver\Exception $e )
101
+		{
96 102
 			throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode() );
97 103
 		}
98 104
 
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Plugin/Provider/Order/ProductFreeOptions.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@  discard block
 block discarded – undo
59 59
 			foreach( $value as $key => $product ) {
60 60
 				$value[$key] = $this->updatePrice( $product );
61 61
 			}
62
-		}
63
-		else
62
+		} else
64 63
 		{
65 64
 			$value = $this->updatePrice( $value );
66 65
 		}
@@ -139,8 +138,7 @@  discard block
 block discarded – undo
139 138
 	{
140 139
 		$priceManager = \Aimeos\MShop::create( $this->context(), 'price' );
141 140
 
142
-		$sortFcn = function( $a, $b ) use( $priceManager, $attrQtys )
143
-		{
141
+		$sortFcn = function( $a, $b ) use( $priceManager, $attrQtys ) {
144 142
 			if( ( $pricesA = $a->getRefItems( 'price', 'default', 'default' )->toArray() ) === [] ) {
145 143
 				return 1;
146 144
 			}
@@ -203,8 +201,7 @@  discard block
 block discarded – undo
203 201
 			{
204 202
 				$list = $this->sortByPrice( $list, $attrQtys );
205 203
 				$priceItem = $this->addPrices( $priceItem, $list, $attrQtys, (int) $prodConf[$type] );
206
-			}
207
-			else
204
+			} else
208 205
 			{
209 206
 				$priceItem = $this->addPrices( $priceItem, $list, $attrQtys, 0 );
210 207
 			}
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
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
 					$manager = \Aimeos\MShop::create( $context, 'attribute' );
166 166
 					$refItem = $manager->find( $refItem->getCode(), [], $domain, $refItem->getType() );
167 167
 				}
168
-				catch( \Exception $e ) { ; } // attribute doesn't exist yet
168
+				catch( \Exception $e ) {; } // attribute doesn't exist yet
169 169
 
170 170
 				$refItem = $this->addRefItems( $refItem, $data );
171 171
 				$item->addListItem( 'attribute', $listItem, $refItem );
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,9 @@
 block discarded – undo
165 165
 					$manager = \Aimeos\MShop::create( $context, 'attribute' );
166 166
 					$refItem = $manager->find( $refItem->getCode(), [], $domain, $refItem->getType() );
167 167
 				}
168
-				catch( \Exception $e ) { ; } // attribute doesn't exist yet
168
+				catch( \Exception $e )
169
+				{
170
+; } // attribute doesn't exist yet
169 171
 
170 172
 				$refItem = $this->addRefItems( $refItem, $data );
171 173
 				$item->addListItem( 'attribute', $listItem, $refItem );
Please login to merge, or discard this patch.
lib/mshoplib/setup/default/DemoAddCatalogData.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 			$this->removeItems( $item->getId(), 'catalog/lists', 'catalog', 'text' );
64 64
 			$this->removeListItems( $item->getId(), 'catalog/lists', 'product' );
65 65
 		}
66
-		catch( \Exception $e ) { ; } // If no root node was already inserted into the database
66
+		catch( \Exception $e ) {; } // If no root node was already inserted into the database
67 67
 
68 68
 		$search = $manager->filter();
69 69
 		$search->setConditions( $search->compare( '=~', 'catalog.code', 'demo-' ) );
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,9 @@
 block discarded – undo
63 63
 			$this->removeItems( $item->getId(), 'catalog/lists', 'catalog', 'text' );
64 64
 			$this->removeListItems( $item->getId(), 'catalog/lists', 'product' );
65 65
 		}
66
-		catch( \Exception $e ) { ; } // If no root node was already inserted into the database
66
+		catch( \Exception $e )
67
+		{
68
+; } // If no root node was already inserted into the database
67 69
 
68 70
 		$search = $manager->filter();
69 71
 		$search->setConditions( $search->compare( '=~', 'catalog.code', 'demo-' ) );
Please login to merge, or discard this patch.
lib/mshoplib/src/MAdmin/Log/Manager/Standard.php 1 patch
Braces   +11 added lines, -6 removed lines patch added patch discarded remove patch
@@ -156,9 +156,12 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	public function create( array $values = [] ) : \Aimeos\MShop\Common\Item\Iface
158 158
 	{
159
-		try {
159
+		try
160
+		{
160 161
 			$values['log.siteid'] = $this->context()->locale()->getSiteId();
161
-		} catch( \Exception $e ) {
162
+		}
163
+		catch( \Exception $e )
164
+		{
162 165
 			$values['log.siteid'] = null;
163 166
 		}
164 167
 
@@ -181,9 +184,12 @@  discard block
 block discarded – undo
181 184
 
182 185
 		$context = $this->context();
183 186
 
184
-		try {
187
+		try
188
+		{
185 189
 			$siteid = $context->locale()->getSiteId();
186
-		} catch( \Exception $e ) {
190
+		}
191
+		catch( \Exception $e )
192
+		{
187 193
 			$siteid = '';
188 194
 		}
189 195
 
@@ -235,8 +241,7 @@  discard block
 block discarded – undo
235 241
 				 */
236 242
 				$path = 'madmin/log/manager/insert';
237 243
 				$sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) );
238
-			}
239
-			else
244
+			} else
240 245
 			{
241 246
 				/** madmin/log/manager/update/mysql
242 247
 				 * Updates an existing log record in the database
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Locale/Manager/Language/Standard.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,9 +112,12 @@  discard block
 block discarded – undo
112 112
 	 */
113 113
 	public function create( array $values = [] ) : \Aimeos\MShop\Common\Item\Iface
114 114
 	{
115
-		try {
115
+		try
116
+		{
116 117
 			$values['locale.language.siteid'] = $this->context()->locale()->getSiteId();
117
-		} catch( \Exception $ex ) {
118
+		}
119
+		catch( \Exception $ex )
120
+		{
118 121
 			$values['locale.language.siteid'] = null;
119 122
 		}
120 123
 
@@ -181,8 +184,7 @@  discard block
 block discarded – undo
181 184
 				 */
182 185
 				$path = 'mshop/locale/manager/language/insert';
183 186
 				$sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) );
184
-			}
185
-			else
187
+			} else
186 188
 			{
187 189
 				/** mshop/locale/manager/language/update/mysql
188 190
 				 * Updates an existing language record in the database
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Locale/Manager/Currency/Standard.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,9 +112,12 @@  discard block
 block discarded – undo
112 112
 	 */
113 113
 	public function create( array $values = [] ) : \Aimeos\MShop\Common\Item\Iface
114 114
 	{
115
-		try {
115
+		try
116
+		{
116 117
 			$values['locale.currency.siteid'] = $this->context()->locale()->getSiteId();
117
-		} catch( \Exception $e ) {
118
+		}
119
+		catch( \Exception $e )
120
+		{
118 121
 			$values['locale.currency.siteid'] = null;
119 122
 		}
120 123
 
@@ -181,8 +184,7 @@  discard block
 block discarded – undo
181 184
 				 */
182 185
 				$path = 'mshop/locale/manager/currency/insert';
183 186
 				$sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) );
184
-			}
185
-			else
187
+			} else
186 188
 			{
187 189
 				/** mshop/locale/manager/currency/update/mysql
188 190
 				 * Updates an existing currency record in the database
Please login to merge, or discard this patch.