Passed
Push — master ( 29d5f6...586595 )
by Aimeos
04:48
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/mshoplib/src/MShop/Supplier/Manager/Factory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,14 +66,14 @@
 block discarded – undo
66 66
 		 * @since 2014.03
67 67
 		 * @category Developer
68 68
 		 */
69
-		if ( $name === null ) {
70
-			$name = $context->getConfig()->get('mshop/supplier/manager/name', 'Standard');
69
+		if( $name === null ) {
70
+			$name = $context->getConfig()->get( 'mshop/supplier/manager/name', 'Standard' );
71 71
 		}
72 72
 
73
-		if ( ctype_alnum($name) === false )
73
+		if( ctype_alnum( $name ) === false )
74 74
 		{
75
-			$classname = is_string($name) ? '\\Aimeos\\MShop\\Supplier\\Manager\\' . $name : '<not a string>';
76
-			throw new \Aimeos\MShop\Supplier\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
75
+			$classname = is_string( $name ) ? '\\Aimeos\\MShop\\Supplier\\Manager\\' . $name : '<not a string>';
76
+			throw new \Aimeos\MShop\Supplier\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
77 77
 		}
78 78
 
79 79
 		$iface = '\\Aimeos\\MShop\\Supplier\\Manager\\Iface';
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
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	protected function isFunction( &$name, array &$params )
78 78
 	{
79 79
 		$len = strlen( $name );
80
-		if( $len === 0 || $name[$len-1] !== ')' ) { return false; }
80
+		if( $len === 0 || $name[$len - 1] !== ')' ) { return false; }
81 81
 
82 82
 		if( ( $pos = strpos( $name, '(' ) ) === false ) {
83 83
 			throw new \Aimeos\MW\Common\Exception( 'Missing opening bracket for function syntax' );
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	protected function setPlugins( array $plugins )
170 170
 	{
171
-		\Aimeos\MW\Common\Base::checkClassList('\\Aimeos\\MW\\Criteria\\Plugin\\Iface', $plugins);
171
+		\Aimeos\MW\Common\Base::checkClassList( '\\Aimeos\\MW\\Criteria\\Plugin\\Iface', $plugins );
172 172
 
173 173
 		$this->plugins = $plugins;
174 174
 	}
Please login to merge, or discard this patch.
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.
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.