Completed
Pull Request — master (#6)
by
unknown
02:13
created
eduadmin-wordpress-sveawebpay.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 add_action( 'admin_init', 'checkForEduAdminPlugin' );
39 39
 function checkForEduAdminPlugin() {
40
-	if ( is_admin() && current_user_can( 'activate_plugins' ) && ! is_plugin_active( 'eduadmin/eduadmin.php' ) ) {
40
+	if ( is_admin() && current_user_can( 'activate_plugins' ) && !is_plugin_active( 'eduadmin/eduadmin.php' ) ) {
41 41
 		add_action( 'admin_notices', function() {
42 42
 			?>
43 43
 			<div class="error">
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	}
53 53
 }
54 54
 
55
-if ( ! class_exists( 'EDU_SveaWebPay_Loader' ) ):
55
+if ( !class_exists( 'EDU_SveaWebPay_Loader' ) ):
56 56
 
57 57
 	final class EDU_SveaWebPay_Loader {
58 58
 		public function __construct() {
Please login to merge, or discard this patch.
class/class-edu-sveawebpay.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 use Svea\WebPay\Config\ConfigurationService;
9 9
 use Svea\WebPay\Response\SveaResponse;
10 10
 
11
-if ( ! class_exists( 'EDU_SveaWebPay' ) ):
11
+if ( !class_exists( 'EDU_SveaWebPay' ) ):
12 12
 
13 13
 	/**
14 14
 	 * EDU_SveaWebPay integrates EduAdmin-WordPress plugin with SveaWebPay as payment gateway
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 				foreach ( $countries as $country ) {
183 183
 					if ( $invoiceCountry == $country->CountryName ) {
184 184
 						$selectedCountry = $country->CountryCode;
185
-						if ( ! empty( $country->CultureName ) ) {
185
+						if ( !empty( $country->CultureName ) ) {
186 186
 							$selectedLocale = $country->CultureName;
187 187
 						}
188 188
 						break;
@@ -211,19 +211,19 @@  discard block
 block discarded – undo
211 211
 
212 212
 				$customer = WebPayItem::companyCustomer();
213 213
 
214
-				if ( ! empty( $bookingInfo->Customer->InvoiceName ) ) {
214
+				if ( !empty( $bookingInfo->Customer->InvoiceName ) ) {
215 215
 					$customer->setCompanyName( $bookingInfo->Customer->InvoiceName );
216 216
 				} else {
217 217
 					$customer->setCompanyName( $bookingInfo->Customer->CustomerName );
218 218
 				}
219 219
 
220
-				if ( ! empty( $bookingInfo->Customer->InvoiceAddress1 ) ) {
220
+				if ( !empty( $bookingInfo->Customer->InvoiceAddress1 ) ) {
221 221
 					$customer->setStreetAddress( $bookingInfo->Customer->InvoiceAddress1 );
222 222
 				} else {
223 223
 					$customer->setStreetAddress( $bookingInfo->Customer->Address1 );
224 224
 				}
225 225
 
226
-				if ( ! empty( $bookingInfo->Customer->InvoiceZip ) ) {
226
+				if ( !empty( $bookingInfo->Customer->InvoiceZip ) ) {
227 227
 					$customer->setZipCode( $bookingInfo->Customer->InvoiceZip );
228 228
 				} else {
229 229
 					$customer->setZipCode( $bookingInfo->Customer->Zip );
@@ -231,17 +231,17 @@  discard block
 block discarded – undo
231 231
 
232 232
 				$zipPreset = WebPayItem::presetValue()
233 233
 				                       ->setTypeName( \Svea\WebPay\Checkout\Model\PresetValue::POSTAL_CODE )
234
-				                       ->setValue( ! empty( $bookingInfo->Customer->InvoiceZip ) ? $bookingInfo->Customer->InvoiceZip : $bookingInfo->Customer->Zip )
234
+				                       ->setValue( !empty( $bookingInfo->Customer->InvoiceZip ) ? $bookingInfo->Customer->InvoiceZip : $bookingInfo->Customer->Zip )
235 235
 				                       ->setIsReadonly( false );
236 236
 				$wpOrder->addPresetValue( $zipPreset );
237 237
 
238
-				if ( ! empty( $bookingInfo->Customer->InvoiceCity ) ) {
238
+				if ( !empty( $bookingInfo->Customer->InvoiceCity ) ) {
239 239
 					$customer->setLocality( $bookingInfo->Customer->InvoiceCity );
240 240
 				} else {
241 241
 					$customer->setLocality( $bookingInfo->Customer->City );
242 242
 				}
243 243
 
244
-				if ( ! empty( $bookingInfo->Customer->Phone ) ) {
244
+				if ( !empty( $bookingInfo->Customer->Phone ) ) {
245 245
 					$customer->setPhoneNumber( $bookingInfo->Customer->Phone );
246 246
 					$phonePreset = WebPayItem::presetValue()
247 247
 					                         ->setTypeName( \Svea\WebPay\Checkout\Model\PresetValue::PHONE_NUMBER )
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 					$wpOrder->addPresetValue( $phonePreset );
251 251
 				}
252 252
 
253
-				if ( ! empty( $bookingInfo->Customer->InvoiceEmail ) ) {
253
+				if ( !empty( $bookingInfo->Customer->InvoiceEmail ) ) {
254 254
 					$customer->setEmail( $bookingInfo->Customer->InvoiceEmail );
255 255
 				} else {
256 256
 					$customer->setEmail( $bookingInfo->Customer->Email );
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 
259 259
 				$emailPreset = WebPayItem::presetValue()
260 260
 				                         ->setTypeName( \Svea\WebPay\Checkout\Model\PresetValue::EMAIL_ADDRESS )
261
-				                         ->setValue( ! empty( $bookingInfo->Customer->InvoiceEmail ) ? $bookingInfo->Customer->InvoiceEmail : $bookingInfo->Customer->Email )
261
+				                         ->setValue( !empty( $bookingInfo->Customer->InvoiceEmail ) ? $bookingInfo->Customer->InvoiceEmail : $bookingInfo->Customer->Email )
262 262
 				                         ->setIsReadonly( false );
263 263
 				$wpOrder->addPresetValue( $emailPreset );
264 264
 
Please login to merge, or discard this patch.