Passed
Push — develop ( 33219b...70059d )
by Remco
04:24
created
classes/CreditCard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 	 * @return DateTime
122 122
 	 */
123 123
 	public function get_expiration_date() {
124
-		return new DateTime( '@' . gmmktime( 0, 0, 0, $this->expiration_month, 1, $this->expiration_year ) );
124
+		return new DateTime( '@'.gmmktime( 0, 0, 0, $this->expiration_month, 1, $this->expiration_year ) );
125 125
 	}
126 126
 
127 127
 	/**
Please login to merge, or discard this patch.
classes/Settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		);
53 53
 
54 54
 		foreach ( $no_trim_options as $option ) {
55
-			add_filter( 'sanitize_option_' . $option, array( $this, 'sanitize_option_dont_trim_posted_value' ), 10, 2 );
55
+			add_filter( 'sanitize_option_'.$option, array( $this, 'sanitize_option_dont_trim_posted_value' ), 10, 2 );
56 56
 		}
57 57
 	}
58 58
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		register_setting(
120 120
 			'pronamic_pay', 'pronamic_pay_thousands_sep', array(
121 121
 				'type'              => 'string',
122
-				'default'           => $wp_locale->number_format['thousands_sep'],
122
+				'default'           => $wp_locale->number_format[ 'thousands_sep' ],
123 123
 				'sanitize_callback' => null,
124 124
 			)
125 125
 		);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		register_setting(
133 133
 			'pronamic_pay', 'pronamic_pay_decimal_sep', array(
134 134
 				'type'              => 'string',
135
-				'default'           => $wp_locale->number_format['decimal_point'],
135
+				'default'           => $wp_locale->number_format[ 'decimal_point' ],
136 136
 				'sanitize_callback' => null,
137 137
 			)
138 138
 		);
Please login to merge, or discard this patch.
classes/Subscriptions/SubscriptionsModule.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -79,15 +79,15 @@  discard block
 block discarded – undo
79 79
 	 * email notifications so users can cancel or renew their subscription.
80 80
 	 */
81 81
 	public function handle_subscription() {
82
-		if ( ! filter_has_var( INPUT_GET, 'subscription' ) ) {
82
+		if ( !filter_has_var( INPUT_GET, 'subscription' ) ) {
83 83
 			return;
84 84
 		}
85 85
 
86
-		if ( ! filter_has_var( INPUT_GET, 'action' ) ) {
86
+		if ( !filter_has_var( INPUT_GET, 'action' ) ) {
87 87
 			return;
88 88
 		}
89 89
 
90
-		if ( ! filter_has_var( INPUT_GET, 'key' ) ) {
90
+		if ( !filter_has_var( INPUT_GET, 'key' ) ) {
91 91
 			return;
92 92
 		}
93 93
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$key = filter_input( INPUT_GET, 'key', FILTER_SANITIZE_STRING );
100 100
 
101 101
 		// Check if subscription is valid.
102
-		if ( ! $subscription ) {
102
+		if ( !$subscription ) {
103 103
 			return;
104 104
 		}
105 105
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 				if ( Statuses::SUCCESS !== $subscription->get_status() ) {
129 129
 					$payment = $this->start_recurring( $subscription, $gateway, true );
130 130
 
131
-					if ( ! $gateway->has_error() ) {
131
+					if ( !$gateway->has_error() ) {
132 132
 						// Redirect.
133 133
 						$gateway->redirect( $payment );
134 134
 					}
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 			return;
158 158
 		}
159 159
 
160
-		if ( ! empty( $subscription->final_payment ) && $subscription->final_payment <= $subscription->next_payment ) {
160
+		if ( !empty( $subscription->final_payment ) && $subscription->final_payment <= $subscription->next_payment ) {
161 161
 			$subscription->next_payment = null;
162 162
 			$subscription->status       = Statuses::COMPLETED;
163 163
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 		$payment->start_date       = $start_date;
200 200
 		$payment->end_date         = $end_date;
201 201
 		$payment->recurring_type   = 'recurring';
202
-		$payment->recurring        = ! $renewal;
202
+		$payment->recurring        = !$renewal;
203 203
 
204 204
 		// Start payment.
205 205
 		$payment = Plugin::start_payment( $payment, $gateway );
@@ -242,11 +242,11 @@  discard block
 block discarded – undo
242 242
 	 * @return array
243 243
 	 */
244 244
 	public function exclude_subscription_comment_notes( $clauses, $query ) {
245
-		$type = $query->query_vars['type'];
245
+		$type = $query->query_vars[ 'type' ];
246 246
 
247 247
 		// Ignore subscription notes comments if it's not specifically requested.
248 248
 		if ( 'subscription_note' !== $type ) {
249
-			$clauses['where'] .= " AND comment_type != 'subscription_note'";
249
+			$clauses[ 'where' ] .= " AND comment_type != 'subscription_note'";
250 250
 		}
251 251
 
252 252
 		return $clauses;
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 		// Check if there is already subscription attached to the payment.
273 273
 		$subscription_id = $payment->get_subscription_id();
274 274
 
275
-		if ( ! empty( $subscription_id ) ) {
275
+		if ( !empty( $subscription_id ) ) {
276 276
 			// Subscription already created.
277 277
 			return;
278 278
 		}
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 		foreach ( $query->posts as $post ) {
434 434
 			$subscription = new Subscription( $post->ID );
435 435
 
436
-			do_action( 'pronamic_subscription_renewal_notice_' . $subscription->get_source(), $subscription );
436
+			do_action( 'pronamic_subscription_renewal_notice_'.$subscription->get_source(), $subscription );
437 437
 
438 438
 			// Set next renewal date meta.
439 439
 			$next_renewal = $subscription->get_next_payment_date( 1 );
Please login to merge, or discard this patch.
classes/Subscriptions/Subscription.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 	 * @throws \Exception    Throws an Exception when the `interval_spec` cannot be parsed as an interval.
381 381
 	 */
382 382
 	public function get_date_interval() {
383
-		$interval_spec = 'P' . $this->interval . $this->interval_period;
383
+		$interval_spec = 'P'.$this->interval.$this->interval_period;
384 384
 
385 385
 		$interval = new DateInterval( $interval_spec );
386 386
 
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 	 * @return string
510 510
 	 */
511 511
 	public function get_meta( $key ) {
512
-		$key = '_pronamic_subscription_' . $key;
512
+		$key = '_pronamic_subscription_'.$key;
513 513
 
514 514
 		return get_post_meta( $this->id, $key, true );
515 515
 	}
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 	 * @return boolean        True on successful update, false on failure.
524 524
 	 */
525 525
 	public function set_meta( $key, $value = false ) {
526
-		$key = '_pronamic_subscription_' . $key;
526
+		$key = '_pronamic_subscription_'.$key;
527 527
 
528 528
 		if ( $value instanceof DateTime ) {
529 529
 			$value = $value->format( 'Y-m-d H:i:s' );
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 
549 549
 		if ( $payment ) {
550 550
 			$description = apply_filters( 'pronamic_payment_source_description', $description, $payment );
551
-			$description = apply_filters( 'pronamic_payment_source_description_' . $this->source, $description, $payment );
551
+			$description = apply_filters( 'pronamic_payment_source_description_'.$this->source, $description, $payment );
552 552
 		}
553 553
 
554 554
 		return $description;
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
 
567 567
 		if ( $payment ) {
568 568
 			$url = apply_filters( 'pronamic_payment_source_url', $url, $payment );
569
-			$url = apply_filters( 'pronamic_payment_source_url_' . $this->source, $url, $payment );
569
+			$url = apply_filters( 'pronamic_payment_source_url_'.$this->source, $url, $payment );
570 570
 		}
571 571
 
572 572
 		return $url;
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
 		$payments = $this->get_payments();
642 642
 
643 643
 		if ( count( $payments ) > 0 ) {
644
-			return $payments[0];
644
+			return $payments[ 0 ];
645 645
 		}
646 646
 
647 647
 		return null;
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
 				if ( Statuses::OPEN !== $meta_status ) {
912 912
 					$this->refresh_next_payment_date();
913 913
 
914
-					if ( ! $note ) {
914
+					if ( !$note ) {
915 915
 						$this->add_note( __( "Subscription status changed to 'Open'", 'pronamic_ideal' ) );
916 916
 					}
917 917
 				}
@@ -923,14 +923,14 @@  discard block
 block discarded – undo
923 923
 				if ( Statuses::SUCCESS !== $meta_status ) {
924 924
 					$this->refresh_next_payment_date();
925 925
 
926
-					if ( ! $note ) {
926
+					if ( !$note ) {
927 927
 						$this->add_note( __( "Subscription status changed to 'Active'", 'pronamic_ideal' ) );
928 928
 					}
929 929
 				}
930 930
 
931 931
 				break;
932 932
 			case Statuses::FAILURE:
933
-				if ( ! $note ) {
933
+				if ( !$note ) {
934 934
 					$this->add_note( __( "Subscription status changed to 'Failed'", 'pronamic_ideal' ) );
935 935
 				}
936 936
 
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 			case Statuses::CANCELLED:
939 939
 				$this->set_next_payment_date( false );
940 940
 
941
-				if ( ! $note ) {
941
+				if ( !$note ) {
942 942
 					$this->add_note( __( "Subscription status changed to 'Cancelled'", 'pronamic_ideal' ) );
943 943
 				}
944 944
 
@@ -947,7 +947,7 @@  discard block
 block discarded – undo
947 947
 				$this->set_next_payment_date( false );
948 948
 				$this->set_start_date( false );
949 949
 
950
-				if ( ! $note ) {
950
+				if ( !$note ) {
951 951
 					$this->add_note( __( "Subscription status changed to 'Completed'", 'pronamic_ideal' ) );
952 952
 				}
953 953
 
@@ -968,7 +968,7 @@  discard block
 block discarded – undo
968 968
 	 * @param array $meta The meta data to update.
969 969
 	 */
970 970
 	public function update_meta( $meta ) {
971
-		if ( ! is_array( $meta ) || count( $meta ) === 0 ) {
971
+		if ( !is_array( $meta ) || count( $meta ) === 0 ) {
972 972
 			return;
973 973
 		}
974 974
 
Please login to merge, or discard this patch.
classes/Subscriptions/SubscriptionsDataStoreCPT.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		$post_status = $this->get_post_status( $subscription, null );
89 89
 
90 90
 		if ( null !== $post_status ) {
91
-			$data['post_status'] = $post_status;
91
+			$data[ 'post_status' ] = $post_status;
92 92
 		}
93 93
 
94 94
 		wp_update_post( $data );
@@ -139,21 +139,21 @@  discard block
 block discarded – undo
139 139
 
140 140
 		$id = $subscription->get_id();
141 141
 
142
-		$subscription->config_id       = get_post_meta( $id, $prefix . 'config_id', true );
143
-		$subscription->key             = get_post_meta( $id, $prefix . 'key', true );
144
-		$subscription->source          = get_post_meta( $id, $prefix . 'source', true );
145
-		$subscription->source_id       = get_post_meta( $id, $prefix . 'source_id', true );
146
-		$subscription->frequency       = get_post_meta( $id, $prefix . 'frequency', true );
147
-		$subscription->interval        = get_post_meta( $id, $prefix . 'interval', true );
148
-		$subscription->interval_period = get_post_meta( $id, $prefix . 'interval_period', true );
149
-		$subscription->currency        = get_post_meta( $id, $prefix . 'currency', true );
150
-		$subscription->amount          = get_post_meta( $id, $prefix . 'amount', true );
151
-		$subscription->transaction_id  = get_post_meta( $id, $prefix . 'transaction_id', true );
152
-		$subscription->status          = get_post_meta( $id, $prefix . 'status', true );
153
-		$subscription->description     = get_post_meta( $id, $prefix . 'description', true );
154
-		$subscription->email           = get_post_meta( $id, $prefix . 'email', true );
155
-		$subscription->customer_name   = get_post_meta( $id, $prefix . 'customer_name', true );
156
-		$subscription->payment_method  = get_post_meta( $id, $prefix . 'payment_method', true );
142
+		$subscription->config_id       = get_post_meta( $id, $prefix.'config_id', true );
143
+		$subscription->key             = get_post_meta( $id, $prefix.'key', true );
144
+		$subscription->source          = get_post_meta( $id, $prefix.'source', true );
145
+		$subscription->source_id       = get_post_meta( $id, $prefix.'source_id', true );
146
+		$subscription->frequency       = get_post_meta( $id, $prefix.'frequency', true );
147
+		$subscription->interval        = get_post_meta( $id, $prefix.'interval', true );
148
+		$subscription->interval_period = get_post_meta( $id, $prefix.'interval_period', true );
149
+		$subscription->currency        = get_post_meta( $id, $prefix.'currency', true );
150
+		$subscription->amount          = get_post_meta( $id, $prefix.'amount', true );
151
+		$subscription->transaction_id  = get_post_meta( $id, $prefix.'transaction_id', true );
152
+		$subscription->status          = get_post_meta( $id, $prefix.'status', true );
153
+		$subscription->description     = get_post_meta( $id, $prefix.'description', true );
154
+		$subscription->email           = get_post_meta( $id, $prefix.'email', true );
155
+		$subscription->customer_name   = get_post_meta( $id, $prefix.'customer_name', true );
156
+		$subscription->payment_method  = get_post_meta( $id, $prefix.'payment_method', true );
157 157
 
158 158
 		$first_payment = $subscription->get_first_payment();
159 159
 
@@ -171,22 +171,22 @@  discard block
 block discarded – undo
171 171
 			}
172 172
 		}
173 173
 
174
-		$date_string              = get_post_meta( $id, $prefix . 'start_date', true );
174
+		$date_string              = get_post_meta( $id, $prefix.'start_date', true );
175 175
 		$subscription->start_date = empty( $date_string ) ? null : new DateTime( $date_string );
176 176
 
177
-		$date_string               = get_post_meta( $id, $prefix . 'expiry_date', true );
177
+		$date_string               = get_post_meta( $id, $prefix.'expiry_date', true );
178 178
 		$subscription->expiry_date = empty( $date_string ) ? null : new DateTime( $date_string );
179 179
 
180
-		$date_string                 = get_post_meta( $id, $prefix . 'first_payment', true );
180
+		$date_string                 = get_post_meta( $id, $prefix.'first_payment', true );
181 181
 		$subscription->first_payment = empty( $date_string ) ? null : new DateTime( $date_string );
182 182
 
183
-		$date_string                = get_post_meta( $id, $prefix . 'next_payment', true );
183
+		$date_string                = get_post_meta( $id, $prefix.'next_payment', true );
184 184
 		$subscription->next_payment = empty( $date_string ) ? null : new DateTime( $date_string );
185 185
 
186
-		$date_string                 = get_post_meta( $id, $prefix . 'final_payment', true );
186
+		$date_string                 = get_post_meta( $id, $prefix.'final_payment', true );
187 187
 		$subscription->final_payment = empty( $date_string ) ? null : new DateTime( $date_string );
188 188
 
189
-		$date_string                  = get_post_meta( $id, $prefix . 'renewal_notice', true );
189
+		$date_string                  = get_post_meta( $id, $prefix.'renewal_notice', true );
190 190
 		$subscription->renewal_notice = empty( $date_string ) ? null : new DateTime( $date_string );
191 191
 	}
192 192
 
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
 		$data = array_merge( $subscription->meta, $data );
248 248
 
249 249
 		foreach ( $data as $key => $value ) {
250
-			if ( ! empty( $value ) ) {
251
-				$meta_key = $prefix . $key;
250
+			if ( !empty( $value ) ) {
251
+				$meta_key = $prefix.$key;
252 252
 
253 253
 				update_post_meta( $id, $meta_key, $value );
254 254
 			}
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
 		if ( $previous_status !== $subscription->status ) {
258 258
 			$can_redirect = false;
259 259
 
260
-			do_action( 'pronamic_subscription_status_update_' . $subscription->source . '_' . strtolower( $previous_status ) . '_to_' . strtolower( $subscription->status ), $subscription, $can_redirect );
261
-			do_action( 'pronamic_subscription_status_update_' . $subscription->source, $subscription, $can_redirect );
260
+			do_action( 'pronamic_subscription_status_update_'.$subscription->source.'_'.strtolower( $previous_status ).'_to_'.strtolower( $subscription->status ), $subscription, $can_redirect );
261
+			do_action( 'pronamic_subscription_status_update_'.$subscription->source, $subscription, $can_redirect );
262 262
 			do_action( 'pronamic_subscription_status_update', $subscription, $can_redirect );
263 263
 		}
264 264
 	}
Please login to merge, or discard this patch.
classes/GoogleAnalyticsEcommerce.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
 	private function get_client_id( Payment $payment ) {
164 164
 		$client_id = $payment->get_analytics_client_id();
165 165
 
166
-		if ( ! empty( $client_id ) ) {
166
+		if ( !empty( $client_id ) ) {
167 167
 			return $client_id;
168 168
 		}
169 169
 
170
-		if ( ! empty( $this->client_id ) ) {
170
+		if ( !empty( $this->client_id ) ) {
171 171
 			return $this->client_id;
172 172
 		}
173 173
 
@@ -228,12 +228,12 @@  discard block
 block discarded – undo
228 228
 
229 229
 		$ga = explode( '.', $ga_cookie );
230 230
 
231
-		if ( isset( $ga[2] ) && GoogleAnalyticsEcommerce::is_uuid( $ga[2] ) ) {
231
+		if ( isset( $ga[ 2 ] ) && GoogleAnalyticsEcommerce::is_uuid( $ga[ 2 ] ) ) {
232 232
 			// Use UUID from cookie.
233
-			$client_id = $ga[2];
234
-		} elseif ( isset( $ga[2], $ga[3] ) ) {
233
+			$client_id = $ga[ 2 ];
234
+		} elseif ( isset( $ga[ 2 ], $ga[ 3 ] ) ) {
235 235
 			// Older Google Client ID.
236
-			$client_id = sprintf( '%s.%s', $ga[2], $ga[3] );
236
+			$client_id = sprintf( '%s.%s', $ga[ 2 ], $ga[ 3 ] );
237 237
 		}
238 238
 
239 239
 		return $client_id;
Please login to merge, or discard this patch.
classes/Payments/PaymentData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -219,13 +219,13 @@
 block discarded – undo
219 219
 	 * @return string
220 220
 	 */
221 221
 	public function get_subscription_id() {
222
-		if ( ! $this->get_subscription() ) {
222
+		if ( !$this->get_subscription() ) {
223 223
 			return;
224 224
 		}
225 225
 
226 226
 		$payment = get_pronamic_payment_by_meta( '_pronamic_payment_source_id', $this->get_subscription_source_id() );
227 227
 
228
-		if ( ! $payment ) {
228
+		if ( !$payment ) {
229 229
 			return;
230 230
 		}
231 231
 
Please login to merge, or discard this patch.
classes/Payments/PaymentsDataStoreCPT.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		$post_status = $this->get_post_status( $payment, null );
104 104
 
105 105
 		if ( null !== $post_status ) {
106
-			$data['post_status'] = $post_status;
106
+			$data[ 'post_status' ] = $post_status;
107 107
 		}
108 108
 
109 109
 		wp_update_post( $data );
@@ -147,52 +147,52 @@  discard block
 block discarded – undo
147 147
 
148 148
 		$id = $payment->get_id();
149 149
 
150
-		$payment->config_id = get_post_meta( $id, $prefix . 'config_id', true );
151
-		$payment->key       = get_post_meta( $id, $prefix . 'key', true );
150
+		$payment->config_id = get_post_meta( $id, $prefix.'config_id', true );
151
+		$payment->key       = get_post_meta( $id, $prefix.'key', true );
152 152
 
153
-		$payment->amount   = (float) get_post_meta( $id, $prefix . 'amount', true );
154
-		$payment->currency = get_post_meta( $id, $prefix . 'currency', true );
155
-		$payment->method   = get_post_meta( $id, $prefix . 'method', true );
156
-		$payment->issuer   = get_post_meta( $id, $prefix . 'issuer', true );
153
+		$payment->amount   = (float) get_post_meta( $id, $prefix.'amount', true );
154
+		$payment->currency = get_post_meta( $id, $prefix.'currency', true );
155
+		$payment->method   = get_post_meta( $id, $prefix.'method', true );
156
+		$payment->issuer   = get_post_meta( $id, $prefix.'issuer', true );
157 157
 
158
-		$payment->order_id       = get_post_meta( $id, $prefix . 'order_id', true );
159
-		$payment->transaction_id = get_post_meta( $id, $prefix . 'transaction_id', true );
160
-		$payment->entrance_code  = get_post_meta( $id, $prefix . 'entrance_code', true );
161
-		$payment->action_url     = get_post_meta( $id, $prefix . 'action_url', true );
158
+		$payment->order_id       = get_post_meta( $id, $prefix.'order_id', true );
159
+		$payment->transaction_id = get_post_meta( $id, $prefix.'transaction_id', true );
160
+		$payment->entrance_code  = get_post_meta( $id, $prefix.'entrance_code', true );
161
+		$payment->action_url     = get_post_meta( $id, $prefix.'action_url', true );
162 162
 
163
-		$payment->source      = get_post_meta( $id, $prefix . 'source', true );
164
-		$payment->source_id   = get_post_meta( $id, $prefix . 'source_id', true );
165
-		$payment->description = get_post_meta( $id, $prefix . 'description', true );
163
+		$payment->source      = get_post_meta( $id, $prefix.'source', true );
164
+		$payment->source_id   = get_post_meta( $id, $prefix.'source_id', true );
165
+		$payment->description = get_post_meta( $id, $prefix.'description', true );
166 166
 
167
-		$payment->language = get_post_meta( $id, $prefix . 'language', true );
168
-		$payment->locale   = get_post_meta( $id, $prefix . 'locale', true );
169
-		$payment->email    = get_post_meta( $id, $prefix . 'email', true );
167
+		$payment->language = get_post_meta( $id, $prefix.'language', true );
168
+		$payment->locale   = get_post_meta( $id, $prefix.'locale', true );
169
+		$payment->email    = get_post_meta( $id, $prefix.'email', true );
170 170
 
171
-		$payment->status = get_post_meta( $id, $prefix . 'status', true );
171
+		$payment->status = get_post_meta( $id, $prefix.'status', true );
172 172
 
173
-		$payment->customer_name       = get_post_meta( $id, $prefix . 'customer_name', true );
174
-		$payment->address             = get_post_meta( $id, $prefix . 'address', true );
175
-		$payment->zip                 = get_post_meta( $id, $prefix . 'zip', true );
176
-		$payment->city                = get_post_meta( $id, $prefix . 'city', true );
177
-		$payment->country             = get_post_meta( $id, $prefix . 'country', true );
178
-		$payment->telephone_number    = get_post_meta( $id, $prefix . 'telephone_number', true );
179
-		$payment->analytics_client_id = get_post_meta( $id, $prefix . 'analytics_client_id', true );
173
+		$payment->customer_name       = get_post_meta( $id, $prefix.'customer_name', true );
174
+		$payment->address             = get_post_meta( $id, $prefix.'address', true );
175
+		$payment->zip                 = get_post_meta( $id, $prefix.'zip', true );
176
+		$payment->city                = get_post_meta( $id, $prefix.'city', true );
177
+		$payment->country             = get_post_meta( $id, $prefix.'country', true );
178
+		$payment->telephone_number    = get_post_meta( $id, $prefix.'telephone_number', true );
179
+		$payment->analytics_client_id = get_post_meta( $id, $prefix.'analytics_client_id', true );
180 180
 
181
-		$payment->subscription_id = get_post_meta( $id, $prefix . 'subscription_id', true );
182
-		$payment->recurring_type  = get_post_meta( $id, $prefix . 'recurring_type', true );
183
-		$payment->recurring       = get_post_meta( $id, $prefix . 'recurring', true );
181
+		$payment->subscription_id = get_post_meta( $id, $prefix.'subscription_id', true );
182
+		$payment->recurring_type  = get_post_meta( $id, $prefix.'recurring_type', true );
183
+		$payment->recurring       = get_post_meta( $id, $prefix.'recurring', true );
184 184
 
185 185
 		// Start Date.
186
-		$start_date_string = get_post_meta( $id, $prefix . 'start_date', true );
186
+		$start_date_string = get_post_meta( $id, $prefix.'start_date', true );
187 187
 
188
-		if ( ! empty( $start_date_string ) ) {
188
+		if ( !empty( $start_date_string ) ) {
189 189
 			$payment->start_date = date_create( $start_date_string );
190 190
 		}
191 191
 
192 192
 		// End Date.
193
-		$end_date_string = get_post_meta( $id, $prefix . 'end_date', true );
193
+		$end_date_string = get_post_meta( $id, $prefix.'end_date', true );
194 194
 
195
-		if ( ! empty( $end_date_string ) ) {
195
+		if ( !empty( $end_date_string ) ) {
196 196
 			$payment->end_date = date_create( $end_date_string );
197 197
 		}
198 198
 	}
@@ -249,18 +249,18 @@  discard block
 block discarded – undo
249 249
 		);
250 250
 
251 251
 		if ( isset( $payment->start_date ) ) {
252
-			$data['start_date'] = $payment->start_date->format( 'Y-m-d H:i:s' );
252
+			$data[ 'start_date' ] = $payment->start_date->format( 'Y-m-d H:i:s' );
253 253
 		}
254 254
 
255 255
 		if ( isset( $payment->end_date ) ) {
256
-			$data['end_date'] = $payment->end_date->format( 'Y-m-d H:i:s' );
256
+			$data[ 'end_date' ] = $payment->end_date->format( 'Y-m-d H:i:s' );
257 257
 		}
258 258
 
259 259
 		$data = array_merge( $payment->meta, $data );
260 260
 
261 261
 		foreach ( $data as $key => $value ) {
262
-			if ( ! empty( $value ) ) {
263
-				$meta_key = $prefix . $key;
262
+			if ( !empty( $value ) ) {
263
+				$meta_key = $prefix.$key;
264 264
 
265 265
 				update_post_meta( $payment->get_id(), $meta_key, $value );
266 266
 			}
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
 		if ( $previous_status !== $payment->status ) {
270 270
 			$can_redirect = false;
271 271
 
272
-			do_action( 'pronamic_payment_status_update_' . $payment->source . '_' . $previous_status . '_to_' . $payment->status, $payment, $can_redirect );
273
-			do_action( 'pronamic_payment_status_update_' . $payment->source, $payment, $can_redirect );
272
+			do_action( 'pronamic_payment_status_update_'.$payment->source.'_'.$previous_status.'_to_'.$payment->status, $payment, $can_redirect );
273
+			do_action( 'pronamic_payment_status_update_'.$payment->source, $payment, $can_redirect );
274 274
 			do_action( 'pronamic_payment_status_update', $payment, $can_redirect );
275 275
 		}
276 276
 	}
Please login to merge, or discard this patch.
classes/Payments/Payment.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -422,9 +422,9 @@  discard block
 block discarded – undo
422 422
 	 * @return string
423 423
 	 */
424 424
 	public function get_source_text() {
425
-		$text = $this->get_source() . '<br />' . $this->get_source_id();
425
+		$text = $this->get_source().'<br />'.$this->get_source_id();
426 426
 
427
-		$text = apply_filters( 'pronamic_payment_source_text_' . $this->get_source(), $text, $this );
427
+		$text = apply_filters( 'pronamic_payment_source_text_'.$this->get_source(), $text, $this );
428 428
 		$text = apply_filters( 'pronamic_payment_source_text', $text, $this );
429 429
 
430 430
 		return $text;
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 	 * @return mixed
557 557
 	 */
558 558
 	public function get_meta( $key ) {
559
-		$key = '_pronamic_payment_' . $key;
559
+		$key = '_pronamic_payment_'.$key;
560 560
 
561 561
 		return get_post_meta( $this->id, $key, true );
562 562
 	}
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
 		$url = home_url( '/' );
634 634
 
635 635
 		$url = apply_filters( 'pronamic_payment_redirect_url', $url, $this );
636
-		$url = apply_filters( 'pronamic_payment_redirect_url_' . $this->source, $url, $this );
636
+		$url = apply_filters( 'pronamic_payment_redirect_url_'.$this->source, $url, $this );
637 637
 
638 638
 		return $url;
639 639
 	}
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
 		$description = $this->source;
660 660
 
661 661
 		$description = apply_filters( 'pronamic_payment_source_description', $description, $this );
662
-		$description = apply_filters( 'pronamic_payment_source_description_' . $this->source, $description, $this );
662
+		$description = apply_filters( 'pronamic_payment_source_description_'.$this->source, $description, $this );
663 663
 
664 664
 		return $description;
665 665
 	}
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 		$url = null;
674 674
 
675 675
 		$url = apply_filters( 'pronamic_payment_source_url', $url, $this );
676
-		$url = apply_filters( 'pronamic_payment_source_url_' . $this->source, $url, $this );
676
+		$url = apply_filters( 'pronamic_payment_source_url_'.$this->source, $url, $this );
677 677
 
678 678
 		return $url;
679 679
 	}
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 		$gateway_id = get_post_meta( $config_id, '_pronamic_gateway_id', true );
691 691
 
692 692
 		$url = apply_filters( 'pronamic_payment_provider_url', $url, $this );
693
-		$url = apply_filters( 'pronamic_payment_provider_url_' . $gateway_id, $url, $this );
693
+		$url = apply_filters( 'pronamic_payment_provider_url_'.$gateway_id, $url, $this );
694 694
 
695 695
 		return $url;
696 696
 	}
Please login to merge, or discard this patch.