Completed
Push — master ( 6ee764...55c4da )
by Evan
09:08 queued 03:37
created
admin/class-yikes-inc-easy-mailchimp-extender-admin.php 2 patches
Doc Comments   -4 removed lines patch added patch discarded remove patch
@@ -1214,8 +1214,6 @@  discard block
 block discarded – undo
1214 1214
 	 * the correct WordPress options API (old plugin stored options wierdly)
1215 1215
 	 *
1216 1216
 	 * @since    1.0.0
1217
-	 * @param      string    $yikes_inc_easy_mailchimp_extender       The name of this plugin.
1218
-	 * @param      string    $version    The version of this plugin.
1219 1217
 	 */
1220 1218
 	public function check_for_old_yks_mc_options() {
1221 1219
 		$old_plugin_options = get_option( 'ykseme_storage' );
@@ -1250,8 +1248,6 @@  discard block
 block discarded – undo
1250 1248
 		 * the correct WordPress options API (old plugin stored options wierdly)
1251 1249
 		 *
1252 1250
 		 * @since    1.0.0
1253
-		 * @param      string    $yikes_inc_easy_mailchimp_extender       The name of this plugin.
1254
-		 * @param      string    $version    The version of this plugin.
1255 1251
 		 */
1256 1252
 		public function display_options_migrate_notice() {
1257 1253
 			
Please login to merge, or discard this patch.
Braces   +34 added lines, -31 removed lines patch added patch discarded remove patch
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
290 290
 			}
291 291
 			// include the export class
292
-			if( ! class_exists( 'Yikes_Inc_Easy_MailChimp_Export_Class' ) ) {	
292
+			if( ! class_exists( 'Yikes_Inc_Easy_MailChimp_Export_Class' ) ) {
293 293
 				include_once( YIKES_MC_PATH . 'includes/import-export/yikes-easy-mailchimp-export.class.php' );
294 294
 			}
295 295
 			// run the export function
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
315 315
 			}
316 316
 			// include the export class
317
-			if( ! class_exists( 'Yikes_Inc_Easy_MailChimp_Export_Class' ) ) {	
317
+			if( ! class_exists( 'Yikes_Inc_Easy_MailChimp_Export_Class' ) ) {
318 318
 				include_once( YIKES_MC_PATH . 'includes/import-export/yikes-easy-mailchimp-export.class.php' );
319 319
 			}
320 320
 			// run the export function
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 				wp_die( __( "We've run into an error. The security check didn't pass. Please try again." , 'yikes-inc-easy-mailchimp-extender' ) , __( "Failed nonce validation" , 'yikes-inc-easy-mailchimp-extender' ) , array( 'response' => 500 , 'back_link' => true ) );
338 338
 			}
339 339
 			// include the export class
340
-			if( ! class_exists( 'Yikes_Inc_Easy_MailChimp_Import_Class' ) ) {	
340
+			if( ! class_exists( 'Yikes_Inc_Easy_MailChimp_Import_Class' ) ) {
341 341
 				include_once( YIKES_MC_PATH . 'includes/import-export/yikes-easy-mailchimp-import.class.php' );
342 342
 			}
343 343
 			// run the import function
@@ -413,8 +413,9 @@  discard block
 block discarded – undo
413 413
 			$create_ticket_response = wp_remote_retrieve_body( $response );
414 414
 			
415 415
 			// display it
416
-			if( $create_ticket_response )
417
-				echo $create_ticket_response;
416
+			if( $create_ticket_response ) {
417
+							echo $create_ticket_response;
418
+			}
418 419
 
419 420
 		}
420 421
 		
@@ -456,7 +457,7 @@  discard block
 block discarded – undo
456 457
 			- if it's past 2 weeks we ask the user for a review :)
457 458
 			@since v6.0.0
458 459
 		*/
459
-		public function yikes_easy_mailchimp_check_installation_date() {	
460
+		public function yikes_easy_mailchimp_check_installation_date() {
460 461
 			
461 462
 			// add a new option to store the plugin activation date/time
462 463
 			// @since v6.0.0
@@ -482,7 +483,7 @@  discard block
 block discarded – undo
482 483
 			asking for a review, and for user feedback 
483 484
 			@since v6.0.0
484 485
 		*/
485
-		public function yikes_easy_mailchimp_display_review_us_notice() {	
486
+		public function yikes_easy_mailchimp_display_review_us_notice() {
486 487
 			/* Lets only display our admin notice on YT4WP pages to not annoy the hell out of people :) */
487 488
 			if ( in_array( get_current_screen()->base , array( 'dashboard' , 'post' , 'edit' ) ) || strpos( get_current_screen()->base ,'yikes-inc-easy-mailchimp') !== false ) {
488 489
 				// Review URL - Change to the URL of your plugin on WordPress.org
@@ -534,7 +535,7 @@  discard block
 block discarded – undo
534 535
 		
535 536
 	/* TinyMCE Functions */
536 537
 		// load our button and pass in the JS form data variable
537
-		public function add_tinyMCE_buttons() {	
538
+		public function add_tinyMCE_buttons() {
538 539
 			global $typenow;
539 540
 			// only on Post Type: post and page
540 541
 			if( ! in_array( $typenow, array( 'post', 'page' ) ) ) {
@@ -545,7 +546,7 @@  discard block
 block discarded – undo
545 546
 		}
546 547
 		
547 548
 		// Add the button key for address via JS
548
-		public function yks_mc_add_tinymce_button( $buttons ) {	
549
+		public function yks_mc_add_tinymce_button( $buttons ) {
549 550
 			array_push( $buttons, 'yks_mc_tinymce_button_key' );
550 551
 			// Print all buttons
551 552
 			return $buttons;
@@ -573,7 +574,7 @@  discard block
 block discarded – undo
573 574
 			$list_data = $wpdb->get_results( 'SELECT * FROM ' . $wpdb->prefix . 'yikes_easy_mc_forms', ARRAY_A );
574 575
 			$lists = array();
575 576
 			$i = 0;
576
-			if( !empty( $list_data ) ) {	
577
+			if( !empty( $list_data ) ) {
577 578
 				// build an array to pass to our javascript
578 579
 				foreach( $list_data as $form ) {
579 580
 						$lists[$i] = array( 
@@ -621,7 +622,7 @@  discard block
 block discarded – undo
621 622
 			/* If the user had this plugin activated prior to today, redirect to 'Whats New' */
622 623
 			if( get_option( 'yikes_easy_mailchimp_activation_date', strtotime( 'now' ) ) == strtotime( 'now' ) ) {
623 624
 				wp_redirect( esc_url( admin_url( 'admin.php?page=yikes-mailchimp-welcome' ) ) );    
624
-			} else { 
625
+			} else {
625 626
 				/* Else redirect the user over to the 'Getting Started' tab */
626 627
 				wp_redirect( esc_url_raw( admin_url( 'admin.php?page=yikes-mailchimp-welcome&section=whats-new' ) ) );    
627 628
 			}
@@ -795,7 +796,7 @@  discard block
 block discarded – undo
795 796
 	*	Register our admin pages
796 797
 	*	used to display data back to the user
797 798
 	**/
798
-	public function register_admin_pages() {	
799
+	public function register_admin_pages() {
799 800
 				
800 801
 		/* Top Level Menu 'Easy MailChimp' */
801 802
 		add_menu_page( 
@@ -841,7 +842,7 @@  discard block
 block discarded – undo
841 842
 					
842 843
 					
843 844
 			/* YIKES Inc. Easy MailChimp Account Overview */
844
-			if ( get_option('yikes-mc-api-validation') == 'valid_api_key' ) {	
845
+			if ( get_option('yikes-mc-api-validation') == 'valid_api_key' ) {
845 846
 				/* YIKES Inc. Easy MailChimp Settings */
846 847
 				add_submenu_page(
847 848
 					'yikes-inc-easy-mailchimp', 
@@ -1024,7 +1025,7 @@  discard block
 block discarded – undo
1024 1025
 	*
1025 1026
 	* @since v.5.4
1026 1027
 	**/
1027
-	function yikes_easy_mc_settings_init() { 	
1028
+	function yikes_easy_mc_settings_init() {
1028 1029
 				
1029 1030
 		/* Register General Settings Section */
1030 1031
 		
@@ -1168,7 +1169,7 @@  discard block
 block discarded – undo
1168 1169
 			if( isset( $body['msg'] ) && $body['msg'] == "Everything's Chimpy!" ) {
1169 1170
 				update_option( 'yikes-mc-api-validation' , 'valid_api_key' );
1170 1171
 			}
1171
-		}  else {
1172
+		} else {
1172 1173
 			require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
1173 1174
 			$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
1174 1175
 			$error_logging->yikes_easy_mailchimp_write_to_error_log( $api_key_response->get_error_message() , __( "Connecting to MailChimp" , 'yikes-inc-easy-mailchimp-extender' ) , __( "Settings Page/General Settings" , 'yikes-inc-easy-mailchimp-extender' ) );
@@ -1331,7 +1332,7 @@  discard block
 block discarded – undo
1331 1332
 			$done = $_POST['done_import'];
1332 1333
 			// Create some starter forms for the user
1333 1334
 			// based on previously imported lists (to our old version)
1334
-			if( $option_name == 'yikes-mc-lists' ) {	
1335
+			if( $option_name == 'yikes-mc-lists' ) {
1335 1336
 				global $wpdb;
1336 1337
 				$option_value = $_POST['option_value'];	
1337 1338
 				$new_options = json_decode( stripslashes_deep( $option_value ) , true );
@@ -1726,7 +1727,7 @@  discard block
 block discarded – undo
1726 1727
 								<input type="hidden" name="field[<?php echo $field['merge']; ?>][merge]" value="<?php echo $field['merge']; ?>" />
1727 1728
 								<input type="hidden" class="field-<?php echo $field['merge']; ?>-position position-input" name="field[<?php echo $field['merge']; ?>][position]" value="<?php echo $i++; ?>" />
1728 1729
 								
1729
-								<?php if ( $field['type'] == 'radio' || $field['type'] == 'dropdown' || $field['type'] == 'select' ) { 
1730
+								<?php if ( $field['type'] == 'radio' || $field['type'] == 'dropdown' || $field['type'] == 'select' ) {
1730 1731
 									$choices = json_decode( $field['choices'], true );
1731 1732
 								?>
1732 1733
 									<input type="hidden" name="field[<?php echo $field['merge']; ?>][choices]" value='<?php echo esc_attr( json_encode( $choices ) ); ?>' />			
@@ -1750,7 +1751,7 @@  discard block
 block discarded – undo
1750 1751
 										</tr>
1751 1752
 										
1752 1753
 										<!-- Placeholder Value -->
1753
-										<?php switch( $field['type'] ) { 
1754
+										<?php switch( $field['type'] ) {
1754 1755
 											
1755 1756
 											case 'text':
1756 1757
 											case 'email':
@@ -1779,7 +1780,7 @@  discard block
 block discarded – undo
1779 1780
 										?>
1780 1781
 										
1781 1782
 										<!-- Default Value -->
1782
-										<?php switch( $field['type'] ) { 
1783
+										<?php switch( $field['type'] ) {
1783 1784
 											default:
1784 1785
 											case 'text':
1785 1786
 											case 'number':
@@ -1795,7 +1796,7 @@  discard block
 block discarded – undo
1795 1796
 													<input <?php if( $field['type'] != 'number' ) { ?> type="text" <?php } else { ?> type="number" <?php } ?> class="widefat" name="field[<?php echo $field['merge']; ?>][default]" <?php if( $field['type'] != 'url' ) { ?> value="<?php echo isset( $field['default'] ) ? stripslashes( wp_strip_all_tags( $field['default'] ) ) : ''; ?>" <?php } else { ?> value="<?php echo isset( $field['default'] ) ? stripslashes( wp_strip_all_tags( esc_url_raw( $field['default'] ) ) ) : ''; ?>" <?php } ?> />
1796 1797
 													<p class="description"><small><?php _e( "Assign a default value to populate this field with on initial page load.", 'yikes-inc-easy-mailchimp-extender' );?></small></p>
1797 1798
 													<?php 
1798
-													switch( $field['type'] ) { 
1799
+													switch( $field['type'] ) {
1799 1800
 														case 'text':
1800 1801
 															?>
1801 1802
 																<p><small class="pre-defined-tag-link"><a href="#TB_inline?width=600&height=550&inlineId=pre-defined-tag-container" onclick="storeGlobalClicked( jQuery( this ) );" class="thickbox"><?php _e( 'View Pre-Defined Tags' , 'yikes-inc-easy-mailchimp-extender' ); ?></a></small></p>
@@ -1926,7 +1927,7 @@  discard block
 block discarded – undo
1926 1927
 										<!-- Display Phone/Date Formats back to the user -->
1927 1928
 										<!-- Phone Format Initial Load -->
1928 1929
 										<?php 
1929
-											switch( $field['type'] ) {												
1930
+											switch( $field['type'] ) {
1930 1931
 												/* Store the phone format, for properly regex pattern */
1931 1932
 												case 'phone':
1932 1933
 												case 'birthday':
@@ -1997,7 +1998,8 @@  discard block
 block discarded – undo
1997 1998
 						
1998 1999
 						
1999 2000
 						
2000
-					} else { // THIS IS AN INTEREST GROUP!
2001
+					} else {
2002
+// THIS IS AN INTEREST GROUP!
2001 2003
 					
2002 2004
 						?>
2003 2005
 						<section class="draggable" id="<?php echo $field['group_id']; ?>">
@@ -2028,7 +2030,7 @@  discard block
 block discarded – undo
2028 2030
 									
2029 2031
 									<table class="form-table form-field-container">
2030 2032
 										<!-- Default Value -->
2031
-										<?php switch( $field['type'] ) { 
2033
+										<?php switch( $field['type'] ) {
2032 2034
 											
2033 2035
 											default:
2034 2036
 											case 'radio':
@@ -2269,7 +2271,7 @@  discard block
 block discarded – undo
2269 2271
 					}
2270 2272
 				}
2271 2273
 			}
2272
-			if( !empty( $available_merge_variables['data'][0] ) ) {	
2274
+			if( !empty( $available_merge_variables['data'][0] ) ) {
2273 2275
 				?><ul id="available-fields"><?php
2274 2276
 				foreach( $available_merge_variables['data'][0]['merge_vars'] as $merge_var ) {
2275 2277
 					if( in_array( $merge_var['tag'] , $fields_assigned_to_form ) ) {
@@ -2304,7 +2306,7 @@  discard block
 block discarded – undo
2304 2306
 					}
2305 2307
 				}
2306 2308
 			}
2307
-			if( !empty( $available_interest_groups) ) {	
2309
+			if( !empty( $available_interest_groups) ) {
2308 2310
 				?><ul id="available-interest-groups"><?php
2309 2311
 				foreach( $available_interest_groups as $interest_group ) {
2310 2312
 					if( in_array( $interest_group['id'] , $fields_assigned_to_form ) ) {
@@ -2473,7 +2475,7 @@  discard block
 block discarded – undo
2473 2475
 				// build a data array to duplicate
2474 2476
 				foreach( $form_data as $id => $value ) {
2475 2477
 					// skip the ID field this is unique
2476
-					if( $id != 'id' ) {	
2478
+					if( $id != 'id' ) {
2477 2479
 						// append -Copy- to our new form
2478 2480
 						if( $id == 'form_name' ) {
2479 2481
 							$value = $value . ' - Copy -';
@@ -2632,9 +2634,9 @@  discard block
 block discarded – undo
2632 2634
 			if( isset( $_POST['custom-field'] ) ) {
2633 2635
 				$custom_field_array = array();
2634 2636
 				foreach( $_POST['custom-field'] as $custom_field => $custom_value ) {
2635
-					if( is_array( $custom_value ) ) { 
2637
+					if( is_array( $custom_value ) ) {
2636 2638
 						$custom_field_array[$custom_field] = array_filter( stripslashes_deep( $custom_value ) ); // array_filters to remove empty items (don't save them!)
2637
-					} else {	
2639
+					} else {
2638 2640
 						$custom_field_array[$custom_field] = stripslashes( $custom_value );
2639 2641
 					}
2640 2642
 				}
@@ -2750,7 +2752,7 @@  discard block
 block discarded – undo
2750 2752
 			}
2751 2753
 			// setup the path to the error log
2752 2754
 			$error_log = fopen( plugin_dir_path( __FILE__ ) . '../includes/error_log/yikes-easy-mailchimp-error-log.php' , 'w' );
2753
-			try {	
2755
+			try {
2754 2756
 				// create the file
2755 2757
 				fwrite( $error_log , '' );
2756 2758
 				// close out
@@ -2847,7 +2849,7 @@  discard block
 block discarded – undo
2847 2849
 		*/
2848 2850
 		public function yikes_mailchimp_load_helper_class() {
2849 2851
 			// check to see if it's already loaded up
2850
-			if( !class_exists( 'Yikes_Inc_Easy_Mailchimp_Forms_Helper' ) ) {	
2852
+			if( !class_exists( 'Yikes_Inc_Easy_Mailchimp_Forms_Helper' ) ) {
2851 2853
 				// Include our main helper class file
2852 2854
 				include_once( YIKES_MC_PATH . 'admin/partials/helpers/init.php' );
2853 2855
 			}
@@ -2954,7 +2956,8 @@  discard block
 block discarded – undo
2954 2956
 			include_once( ABSPATH . WPINC . '/feed.php' );
2955 2957
 			$rss = fetch_feed( esc_url( 'http://yikesplugins.com/feed/?post_type=product_ads&genre=easy-forms-for-mailchimp' ) );
2956 2958
 			$maxitems = 0;
2957
-			if ( ! is_wp_error( $rss ) ) { // Checks that the object is created correctly
2959
+			if ( ! is_wp_error( $rss ) ) {
2960
+// Checks that the object is created correctly
2958 2961
 				// Figure out how many total items there are, but limit it to 1. 
2959 2962
 				$maxitems = $rss->get_item_quantity( 1 ); 
2960 2963
 				// Build an array of all the items, starting with element 0 (first element).
Please login to merge, or discard this patch.
includes/import-export/yikes-easy-mailchimp-export.class.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -9,6 +9,11 @@  discard block
 block discarded – undo
9 9
 	*	@form_ids 		array of form ID's to export ie: array( 1,4,5,6 ) (user can select specific forms)
10 10
 	*	@file_name 	the name of the exported file
11 11
 	*/	
12
+
13
+	/**
14
+	 * @param string $table_name
15
+	 * @param string $file_name
16
+	 */
12 17
 	public static function yikes_mailchimp_form_export( $table_name, $form_ids , $file_name ) {
13 18
 		global $wpdb;
14 19
 		$wpdb->show_errors(); 															
@@ -64,6 +69,10 @@  discard block
 block discarded – undo
64 69
 	*	@parameters
65 70
 	*	@file_name 	the name of the exported file
66 71
 	*/	
72
+
73
+	/**
74
+	 * @param string $file_name
75
+	 */
67 76
 	public static function yikes_mailchimp_settings_export( $file_name ) {
68 77
 		
69 78
 		// get an array of all of our plugin settings (on the settings pages), to loop over
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,9 +39,9 @@
 block discarded – undo
39 39
 			foreach ($results as $row) {
40 40
 			 
41 41
 			  // Add table headers
42
-			  if($first){
42
+			  if($first) {
43 43
 				 $titles = array();
44
-				 foreach($row as $key=>$val){
44
+				 foreach($row as $key=>$val) {
45 45
 					$titles[] = $key;
46 46
 				 }
47 47
 				 fputcsv($output_handle, $titles);
Please login to merge, or discard this patch.
public/classes/checkbox-integrations.php 2 patches
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -23,6 +23,10 @@  discard block
 block discarded – undo
23 23
 		*	@since 6.0.0
24 24
 		*	@$integration_type - pass in the type of checkbox integration
25 25
 		*/
26
+
27
+		/**
28
+		 * @param string $integration_type
29
+		 */
26 30
 		public function is_user_already_subscribed( $integration_type ) {
27 31
 			// first check if the user is logged in
28 32
 			if( is_user_logged_in() ) {
@@ -69,6 +73,10 @@  discard block
 block discarded – undo
69 73
 		*	@$email - users email address entered into the form
70 74
 		*	@$integration_type - pass in the type of checkbox integration
71 75
 		*/
76
+
77
+		/**
78
+		 * @param string $integration_type
79
+		 */
72 80
 		public function is_new_registration_already_subscribed( $email , $integration_type ) {
73 81
 			// first check if the user is logged in
74 82
 			$checkbox_options = get_option( 'optin-checkbox-init' , '' );
@@ -233,6 +241,10 @@  discard block
 block discarded – undo
233 241
 		*	before continuing
234 242
 		*	@since 6.0.0
235 243
 		*/
244
+
245
+		/**
246
+		 * @param string $type
247
+		 */
236 248
 		public function was_checkbox_checked( $type ) {
237 249
 			// was sign-up checkbox checked - return the value
238 250
 			return ( isset( $_POST[ 'yikes_mailchimp_checkbox_'.$type ] ) && $_POST[ 'yikes_mailchimp_checkbox_'.$type ] == 1 );
Please login to merge, or discard this patch.
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 		protected $type = 'integration';
14 14
 		private $text_domain = 'yikes-inc-easy-mailchimp-extender';
15 15
 		
16
-		public function __construct() {	
16
+		public function __construct() {
17 17
 			
18 18
 		}
19 19
 			
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 					'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
46 46
 				) );
47 47
 				$already_subscribed = json_decode( wp_remote_retrieve_body( $already_subscribed ), true );	
48
-				if( isset( $already_subscribed['error'] ) ) {	
48
+				if( isset( $already_subscribed['error'] ) ) {
49 49
 					if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
50 50
 						require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
51 51
 						$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 					'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
89 89
 				) );
90 90
 				$already_subscribed = json_decode( wp_remote_retrieve_body( $already_subscribed ), true );
91
-				if( isset( $already_subscribed['error'] ) ) {	
91
+				if( isset( $already_subscribed['error'] ) ) {
92 92
 					if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
93 93
 						require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
94 94
 						$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 		 *
137 137
 		 *	@since 6.0.0
138 138
 		**/
139
-		public function subscribe_user_integration( $email, $type, $merge_vars ) {			
139
+		public function subscribe_user_integration( $email, $type, $merge_vars ) {
140 140
 			// get checkbox data
141 141
 			$checkbox_options = get_option( 'optin-checkbox-init' , '' );
142 142
 			if( $type != 'registration_form' ) {
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 			) );
187 187
 			if( ! Is_wp_error( $subscribe_response ) ) {
188 188
 				$response_body = json_decode( wp_remote_retrieve_body( $subscribe_response ), true );
189
-				if( WP_DEBUG || isset( $response_body['error'] ) ) {	
189
+				if( WP_DEBUG || isset( $response_body['error'] ) ) {
190 190
 					if( get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
191 191
 						require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
192 192
 						$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 		public function yikes_reg_complete_msg( $errors, $redirect_to ) {
248 248
 			if( isset( $errors->errors['registered'] ) ) {
249 249
 				$email_error = get_option( 'yikes_register_subscription_error' , '' );
250
-				if( isset( $email_error ) && $email_error != '' ) {	
250
+				if( isset( $email_error ) && $email_error != '' ) {
251 251
 					// Use the magic __get method to retrieve the errors array:
252 252
 					$tmp = $errors->errors; 
253 253
 					$old = 'Registration complete. Please check your e-mail.';
Please login to merge, or discard this patch.
public/classes/checkbox-integrations/class.bbpress_forms-checkbox.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 		 * @param array $anonymous_data
42 42
 		 * @param int $user_id
43 43
 		 * @param string $trigger
44
-		 * @return boolean
44
+		 * @return boolean|null
45 45
 		 */
46 46
 		public function subscribe_from_bbpress( $anonymous_data, $user_id, $trigger ) {
47 47
 			$user_data = get_userdata( $user_id );
Please login to merge, or discard this patch.
public/classes/checkbox-integrations/class.buddypress_form-checkbox.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,6 @@
 block discarded – undo
40 40
 		 * @param string $user_login
41 41
 		 * @param string $user_password
42 42
 		 * @param string $user_email
43
-		 * @param array $usermeta
44 43
 		 */
45 44
 		public function subscribe_from_buddypress_form( $user_id, $user_login, $user_password, $user_email ) {
46 45
 			if ( $this->was_checkbox_checked( $this->type ) === false ) {
Please login to merge, or discard this patch.
class.easy_digital_downloads_checkout_form-checkbox.php 1 patch
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,6 @@  discard block
 block discarded – undo
41 41
 		
42 42
 		
43 43
 		/**
44
-		 * @param array $meta
45 44
 		 *
46 45
 		 * @return array
47 46
 		 */
@@ -57,7 +56,7 @@  discard block
 block discarded – undo
57 56
 		/**
58 57
 		 * @param int $payment_id The ID of the payment
59 58
 		 *
60
-		 * @return bool|string
59
+		 * @return false|null
61 60
 		 */
62 61
 		public function subscribe_from_edd_purchase( $payment_id ) {
63 62
 			$meta = get_post_meta( $payment_id , '_yikes_easy_mc_optin' , true );
Please login to merge, or discard this patch.
public/classes/checkbox-integrations/class.registration_form-checkbox.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 	 *
36 36
 	 * @param int $user_id
37 37
 	 *
38
-	 * @return bool|string
38
+	 * @return false|null
39 39
 	*/
40 40
 	public function subscribe_from_registration( $user_id ) {
41 41
 		// was sign-up checkbox checked?
Please login to merge, or discard this patch.
admin/partials/dashboard-widgets/class.list-activity-widget.php 1 patch
Braces   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,11 +2,10 @@  discard block
 block discarded – undo
2 2
 	/*
3 3
 	* Our ajax is processed inside of class.ajax.php
4 4
 	*/
5
-	class YIKES_Inc_Easy_MailChimp_Dashboard_Widgets
6
-	{
5
+	class YIKES_Inc_Easy_MailChimp_Dashboard_Widgets {
7 6
 			
8 7
 		// Construction
9
-		public function __construct() {		
8
+		public function __construct() {
10 9
 			if( get_option( 'yikes-mc-api-key' , '' ) != '' && get_option( 'yikes-mc-api-validation' , 'invalid_api_key' ) == 'valid_api_key' ) {
11 10
 				// hook in and display our list stats dashboard widget
12 11
 				add_action( 'wp_dashboard_setup', array( $this , 'yks_mc_add_chimp_chatter_dashboard_widget' ) , 10 );
@@ -18,7 +17,8 @@  discard block
 block discarded – undo
18 17
 		
19 18
 		// enqueue our JS file on the main dashboard page
20 19
 		function enqueue_dashboard_widget_script( $hook ) {
21
-			if( 'index.php' == $hook ) { // default 'dashboard' page
20
+			if( 'index.php' == $hook ) {
21
+// default 'dashboard' page
22 22
 				wp_register_script( 'yikes-easy-mc-dashboard-widget-script' , YIKES_MC_URL . 'admin/js/min/yikes-inc-easy-mailchimp-dashboard-widget.min.js' , array( 'jquery' ) , 'all' , false );
23 23
 				$data_array = array(
24 24
 					'ajax_url' => esc_url_raw( admin_url( 'admin-ajax.php' ) ),
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 						'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
75 75
 					) );
76 76
 					$list_data = json_decode( wp_remote_retrieve_body( $list_data ), true );
77
-					if( isset( $list_data['error'] ) ) {	
77
+					if( isset( $list_data['error'] ) ) {
78 78
 						if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
79 79
 							require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
80 80
 							$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 		function account_activity_dashboard_widget() {
121 121
 				// Get our list data!
122 122
 				// Check for a transient, if not - set one up for one hour
123
-				if ( false === ( $account_activity = get_transient( 'yikes-easy-mailchimp-account-activity' ) ) ) {		
123
+				if ( false === ( $account_activity = get_transient( 'yikes-easy-mailchimp-account-activity' ) ) ) {
124 124
 					$api_key = trim( get_option( 'yikes-mc-api-key' , '' ) );
125 125
 					$dash_position = strpos( $api_key, '-' );
126 126
 					if( $dash_position !== false ) {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 						'sslverify' => apply_filters( 'yikes-mailchimp-sslverify', true )
135 135
 					) );
136 136
 					$account_activity = json_decode( wp_remote_retrieve_body( $account_activity ), true );
137
-					if( isset( $account_activity['error'] ) ) {	
137
+					if( isset( $account_activity['error'] ) ) {
138 138
 						if( WP_DEBUG || get_option( 'yikes-mailchimp-debug-status' , '' ) == '1' ) {
139 139
 							require_once YIKES_MC_PATH . 'includes/error_log/class-yikes-inc-easy-mailchimp-error-logging.php';
140 140
 							$error_logging = new Yikes_Inc_Easy_Mailchimp_Error_Logging();
Please login to merge, or discard this patch.
admin/partials/ajax/class.ajax.php 1 patch
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,10 +7,9 @@  discard block
 block discarded – undo
7 7
 	*	@since 6.0.0
8 8
 	*	Author: Yikes Inc. | https://www.yikesinc.com
9 9
 	*/
10
-	class YIKES_Inc_Easy_MailChimp_Process_Ajax
11
-	{
10
+	class YIKES_Inc_Easy_MailChimp_Process_Ajax {
12 11
 
13
-		public function __construct() {				
12
+		public function __construct() {
14 13
 			// ajax send merge variable to form builder
15 14
 			add_action( 'wp_ajax_add_field_to_form', array( $this , 'send_field_to_form' ), 10 );
16 15
 			// ajax send interest group to form builder
@@ -74,10 +73,10 @@  discard block
 block discarded – undo
74 73
 		// to allow users to pre-check anything they want to assign users appropriately
75 74
 		/* note: this function is called statically from the integration settings page */
76 75
 		public static function check_list_for_interest_groups( $list_id='', $integration_type='', $load=false ) {
77
-			if( ! $list_id ) { 	
76
+			if( ! $list_id ) {
78 77
 				$list_id = $_POST['list_id'];
79 78
 			}
80
-			if( ! $integration_type ) {	
79
+			if( ! $integration_type ) {
81 80
 				$integration_type = $_POST['integration'];
82 81
 			}
83 82
 			$api_key = trim( get_option( 'yikes-mc-api-key' , '' ) );
Please login to merge, or discard this patch.