Passed
Push — master ( 50e989...69e622 )
by Aimeos
05:21
created
lib/mshoplib/src/MShop/Service/Provider/Decorator/Country.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,10 +118,11 @@
 block discarded – undo
118 118
 			) {
119 119
 				return false;
120 120
 			}
121
-		}
122
-		else if( isset( $addresses[$paymentType] ) ) // use billing address if no delivery address is available
121
+		} else if( isset( $addresses[$paymentType] ) ) {
122
+			// use billing address if no delivery address is available
123 123
 		{
124 124
 			$code = strtoupper( $addresses[$paymentType]->getCountryId() );
125
+		}
125 126
 
126 127
 			if( $this->checkCountryCode( $code, 'country.delivery-include' ) === false
127 128
 				|| $this->checkCountryCode( $code, 'country.delivery-exclude' ) === true
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Criteria/Attribute/Standard.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,8 +90,8 @@
 block discarded – undo
90 90
 
91 91
 		foreach( $required as $entry )
92 92
 		{
93
-			if ( !isset($params[$entry]) ) {
94
-				throw new \Aimeos\MW\Common\Exception( sprintf('Required parameter "%1$s" is missing', $entry) );
93
+			if( !isset( $params[$entry] ) ) {
94
+				throw new \Aimeos\MW\Common\Exception( sprintf( 'Required parameter "%1$s" is missing', $entry ) );
95 95
 			}
96 96
 		}
97 97
 
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Criteria/Expression/Base.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -226,8 +226,7 @@
 block discarded – undo
226 226
 
227 227
 					$params[] = implode( ',', $list );
228 228
 				}
229
-			}
230
-			else
229
+			} else
231 230
 			{
232 231
 				$params[] = $this->escape( '==', $this->getParamType( $string ), $string );
233 232
 			}
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	protected function isFunction( &$name, array &$params )
95 95
 	{
96 96
 		$len = strlen( $name );
97
-		if( $len === 0 || $name[$len-1] !== ')' ) { return false; }
97
+		if( $len === 0 || $name[$len - 1] !== ')' ) { return false; }
98 98
 
99 99
 		if( ( $pos = strpos( $name, '(' ) ) === false ) {
100 100
 			throw new \Aimeos\MW\Common\Exception( 'Missing opening bracket for function syntax' );
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 */
217 217
 	protected function setPlugins( array $plugins )
218 218
 	{
219
-		\Aimeos\MW\Common\Base::checkClassList(\Aimeos\MW\Criteria\Plugin\Iface::class, $plugins);
219
+		\Aimeos\MW\Common\Base::checkClassList( \Aimeos\MW\Criteria\Plugin\Iface::class, $plugins );
220 220
 
221 221
 		$this->plugins = $plugins;
222 222
 	}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Criteria/Expression/Compare/PHP.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -185,12 +185,10 @@
 block discarded – undo
185 185
 			}
186 186
 
187 187
 			return 'string';
188
-		}
189
-		else if( strpos( $item, '.' ) !== false )
188
+		} else if( strpos( $item, '.' ) !== false )
190 189
 		{
191 190
 			return 'float';
192
-		}
193
-		else if( ctype_digit( $item ) !== false )
191
+		} else if( ctype_digit( $item ) !== false )
194 192
 		{
195 193
 			return 'int';
196 194
 		}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Criteria/Expression/Compare/SQL.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@
 block discarded – undo
134 134
 			$values[$key] = $this->escape( $operator, $type, $value );
135 135
 		}
136 136
 
137
-		return '(' . implode(',', $values) . ')';
137
+		return '(' . implode( ',', $values ) . ')';
138 138
 	}
139 139
 
140 140
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -200,16 +200,13 @@
 block discarded – undo
200 200
 			}
201 201
 
202 202
 			return \Aimeos\MW\DB\Statement\Base::PARAM_STR;
203
-		}
204
-		elseif( strpos( $item, '.' ) !== false )
203
+		} elseif( strpos( $item, '.' ) !== false )
205 204
 		{
206 205
 			return \Aimeos\MW\DB\Statement\Base::PARAM_FLOAT;
207
-		}
208
-		elseif( ctype_digit( $item ) !== false )
206
+		} elseif( ctype_digit( $item ) !== false )
209 207
 		{
210 208
 			return \Aimeos\MW\DB\Statement\Base::PARAM_INT;
211
-		}
212
-		elseif( $item === 'null' )
209
+		} elseif( $item === 'null' )
213 210
 		{
214 211
 			return \Aimeos\MW\DB\Statement\Base::PARAM_NULL;
215 212
 		}
Please login to merge, or discard this patch.
lib/mwlib/src/MW/Criteria/Expression/Sort/PHP.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -143,12 +143,10 @@
 block discarded – undo
143 143
 			}
144 144
 
145 145
 			return '(string)';
146
-		}
147
-		else if( strpos( $item, '.' ) !== false )
146
+		} else if( strpos( $item, '.' ) !== false )
148 147
 		{
149 148
 			return '(float)';
150
-		}
151
-		else if( ctype_digit( $item ) !== false )
149
+		} else if( ctype_digit( $item ) !== false )
152 150
 		{
153 151
 			return '(int)';
154 152
 		}
Please login to merge, or discard this patch.
setup.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,15 +65,13 @@
 block discarded – undo
65 65
 				{
66 66
 					$options[$name] = (array) $options[$name];
67 67
 					$options[$name][] = substr( $option, $pos + 1 );
68
-				}
69
-				else
68
+				} else
70 69
 				{
71 70
 					$options[$name] = substr( $option, $pos + 1 );
72 71
 				}
73 72
 
74 73
 				unset( $params[$key] );
75
-			}
76
-			else
74
+			} else
77 75
 			{
78 76
 				printf( "Invalid option \"%1\$s\"\n", $option );
79 77
 				usage();
Please login to merge, or discard this patch.
lib/mshoplib/src/MShop/Coupon/Provider/Decorator/Base.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 	 * @param \Aimeos\MShop\Coupon\Item\Iface $couponItem Coupon item with configuration for the provider
34 34
 	 * @param string $code Coupon code entered by the customer
35 35
 	 */
36
-	public function __construct(  \Aimeos\MShop\Coupon\Provider\Iface $provider,
36
+	public function __construct( \Aimeos\MShop\Coupon\Provider\Iface $provider,
37 37
 		\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Coupon\Item\Iface $couponItem, $code )
38 38
 	{
39 39
 		$this->provider = $provider;
Please login to merge, or discard this patch.
lib/mshoplib/tests/MShop/Coupon/Provider/Decorator/ExampleTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 		$this->orderBase = new \Aimeos\MShop\Order\Item\Base\Standard( $priceManager->createItem(), $context->getLocale() );
36 36
 
37 37
 		$provider = new \Aimeos\MShop\Coupon\Provider\Example( $context, $item, 'abcd' );
38
-		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Example( $provider, $context, $item, 'abcd');
38
+		$this->object = new \Aimeos\MShop\Coupon\Provider\Decorator\Example( $provider, $context, $item, 'abcd' );
39 39
 		$this->object->setObject( $this->object );
40 40
 	}
41 41
 
Please login to merge, or discard this patch.