Completed
Branch FET/10766/extract-activation-d... (f6eee0)
by
unknown
13:52 queued 11:58
created
core/domain/services/capabilities/RequiresCapCheckInterface.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@
 block discarded – undo
16 16
 interface RequiresCapCheckInterface
17 17
 {
18 18
 
19
-    /**
20
-     * @return CapCheckInterface
21
-     */
22
-    public function getCapCheck();
19
+	/**
20
+	 * @return CapCheckInterface
21
+	 */
22
+	public function getCapCheck();
23 23
 
24 24
 }
25 25
 // End of file RequiresCapCheckInterface.php
Please login to merge, or discard this patch.
message_type/newsletter/EE_Messages_Contacts_incoming_data.class.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -27,14 +27,14 @@  discard block
 block discarded – undo
27 27
 	 * @throws EE_Error
28 28
 	 * @access protected
29 29
 	 */
30
-	public function __construct( $data = array() ) {
30
+	public function __construct($data = array()) {
31 31
 
32 32
 		//validate that the first element in the array is an EE_Attendee object.  Note that the array may be indexed by REG_ID so we will just shift off the first element.
33
-		$ctc_chk = reset( $data );
34
-		if ( ! $ctc_chk instanceof EE_Attendee )
35
-			throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso') );
33
+		$ctc_chk = reset($data);
34
+		if ( ! $ctc_chk instanceof EE_Attendee)
35
+			throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso'));
36 36
 
37
-		parent::__construct( $data );
37
+		parent::__construct($data);
38 38
 	}
39 39
 
40 40
 
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 	 * @param array $attendees
44 44
 	 * @return array
45 45
 	 */
46
-	public static function convert_data_for_persistent_storage( $attendees ) {
46
+	public static function convert_data_for_persistent_storage($attendees) {
47 47
 		$attendee_ids = array_filter(
48 48
 			array_map(
49
-				function( $attendee ) {
50
-					if ( $attendee instanceof EE_Attendee ) {
49
+				function($attendee) {
50
+					if ($attendee instanceof EE_Attendee) {
51 51
 						return $attendee->ID();
52 52
 					}
53 53
 					return false;
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
 	 * @param array $attendee_ids
67 67
 	 * @return EE_Attendee[]
68 68
 	 */
69
-	public static function convert_data_from_persistent_storage( $attendee_ids ) {
69
+	public static function convert_data_from_persistent_storage($attendee_ids) {
70 70
 		$attendee_ids = (array) $attendee_ids;
71 71
 		$attendees = EEM_Attendee::instance()->get_all(
72 72
 		  array(
73
-			  array( 'ATT_ID' => array( 'IN', $attendee_ids ) )
73
+			  array('ATT_ID' => array('IN', $attendee_ids))
74 74
 		  )
75 75
 		);
76 76
 		return $attendees;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$this->payment = NULL;
100 100
 		$this->billing = array();
101 101
 		$this->reg_objs = array();
102
-		$this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer =  $this->registrations = array();
102
+		$this->attendees = $this->events = $this->tickets = $this->datetimes = $this->questions = $this->answer = $this->registrations = array();
103 103
 		$this->total_ticket_count = 0;
104 104
 		$this->primary_attendee_data = array(
105 105
 			'registration_id' => 0,
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			'primary_reg_obj' => NULL
110 110
 			);
111 111
 
112
-		foreach ( $this->_data as $contact ) {
112
+		foreach ($this->_data as $contact) {
113 113
 			$id = $contact->ID();
114 114
 			$reg = $contact->get_first_related('Registration');
115 115
 			$this->attendees[$id]['att_obj'] = $contact;
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@  discard block
 block discarded – undo
5 5
  * @subpackage helpers
6 6
  * @since           4.3.0
7 7
  */
8
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10
+}
9 11
 
10 12
 /**
11 13
  * This prepares data for message types that send messages for multiple contacts and handles
@@ -31,8 +33,9 @@  discard block
 block discarded – undo
31 33
 
32 34
 		//validate that the first element in the array is an EE_Attendee object.  Note that the array may be indexed by REG_ID so we will just shift off the first element.
33 35
 		$ctc_chk = reset( $data );
34
-		if ( ! $ctc_chk instanceof EE_Attendee )
35
-			throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso') );
36
+		if ( ! $ctc_chk instanceof EE_Attendee ) {
37
+					throw new EE_Error(__('The EE_Message_Contacts_incoming_data class expects an array of EE_Attendee objects.', 'event_espresso') );
38
+		}
36 39
 
37 40
 		parent::__construct( $data );
38 41
 	}
Please login to merge, or discard this patch.
core/CPTs/EE_CPT_Event_Strategy.core.php 2 patches
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
 	 * @param WP_Query $wp_query
40 40
 	 * @param array $CPT
41 41
 	 */
42
-	public function __construct( $wp_query, $CPT = array() ) {
43
-		if ( $wp_query instanceof WP_Query ) {
42
+	public function __construct($wp_query, $CPT = array()) {
43
+		if ($wp_query instanceof WP_Query) {
44 44
 			$WP_Query = $wp_query;
45 45
 			$this->CPT = $CPT;
46 46
 		} else {
47
-			$WP_Query = isset( $wp_query[ 'WP_Query' ] ) ? $wp_query[ 'WP_Query' ] : null;
48
-			$this->CPT = isset( $wp_query[ 'CPT' ] ) ? $wp_query[ 'CPT' ] : null;
47
+			$WP_Query = isset($wp_query['WP_Query']) ? $wp_query['WP_Query'] : null;
48
+			$this->CPT = isset($wp_query['CPT']) ? $wp_query['CPT'] : null;
49 49
 		}
50 50
 		// !!!!!!!!!!  IMPORTANT !!!!!!!!!!!!
51 51
 		// here's the list of available filters in the WP_Query object
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 		// 'posts_fields'
60 60
 		// 'posts_join'
61 61
 		$this->_add_filters();
62
-		if ( $WP_Query instanceof WP_Query ) {
63
-			$WP_Query->is_espresso_event_single = is_singular() && isset( $WP_Query->query->post_type ) && $WP_Query->query->post_type == 'espresso_events' ? TRUE : FALSE;
62
+		if ($WP_Query instanceof WP_Query) {
63
+			$WP_Query->is_espresso_event_single = is_singular() && isset($WP_Query->query->post_type) && $WP_Query->query->post_type == 'espresso_events' ? TRUE : FALSE;
64 64
 			$WP_Query->is_espresso_event_archive = is_post_type_archive('espresso_events') ? TRUE : FALSE;
65
-			$WP_Query->is_espresso_event_taxonomy = is_tax( 'espresso_event_categories' ) ? TRUE : FALSE;
65
+			$WP_Query->is_espresso_event_taxonomy = is_tax('espresso_event_categories') ? TRUE : FALSE;
66 66
 		}
67 67
 
68 68
 	}
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
 	 * (which will get removed in case the next call to get_posts ISN'T
75 75
 	 * for event CPTs)
76 76
 	 */
77
-	protected function _add_filters(){
78
-		add_filter( 'posts_fields', array( $this, 'posts_fields' ), 1, 2 );
79
-		add_filter( 'posts_join', array( $this, 'posts_join' ), 1, 2 );
80
-		add_filter( 'posts_where', array( $this, 'posts_where' ), 10, 2 );
77
+	protected function _add_filters() {
78
+		add_filter('posts_fields', array($this, 'posts_fields'), 1, 2);
79
+		add_filter('posts_join', array($this, 'posts_join'), 1, 2);
80
+		add_filter('posts_where', array($this, 'posts_where'), 10, 2);
81 81
 		// add_filter( 'the_posts', array( $this, 'the_posts' ), 1, 2 );
82
-		add_filter( 'posts_orderby', array( $this, 'posts_orderby' ), 1, 2 );
83
-		add_filter( 'posts_groupby', array( $this, 'posts_groupby' ), 1, 2 );
82
+		add_filter('posts_orderby', array($this, 'posts_orderby'), 1, 2);
83
+		add_filter('posts_groupby', array($this, 'posts_groupby'), 1, 2);
84 84
 	}
85 85
 
86 86
 
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
 	 * This is to avoid applying this CPT strategy for other posts or CPTs (eg,
91 91
 	 * we don't want to join to the datetime table when querying for venues, do we!?)
92 92
 	 */
93
-	protected function _remove_filters(){
94
-		remove_filter( 'posts_fields', array( $this, 'posts_fields' ), 1 );
95
-		remove_filter( 'posts_join', array( $this, 'posts_join' ), 1 );
96
-		remove_filter( 'posts_where', array( $this, 'posts_where' ), 10 );
93
+	protected function _remove_filters() {
94
+		remove_filter('posts_fields', array($this, 'posts_fields'), 1);
95
+		remove_filter('posts_join', array($this, 'posts_join'), 1);
96
+		remove_filter('posts_where', array($this, 'posts_where'), 10);
97 97
 		// remove_filter( 'the_posts', array( $this, 'the_posts' ), 1 );
98
-		remove_filter( 'posts_orderby', array( $this, 'posts_orderby' ), 1 );
99
-		remove_filter( 'posts_groupby', array( $this, 'posts_groupby' ), 1 );
98
+		remove_filter('posts_orderby', array($this, 'posts_orderby'), 1);
99
+		remove_filter('posts_groupby', array($this, 'posts_groupby'), 1);
100 100
 	}
101 101
 
102 102
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 * @param WP_Query $wp_query
110 110
 	 * @return    string
111 111
 	 */
112
-	public function posts_fields( $SQL, WP_Query $wp_query ) {
112
+	public function posts_fields($SQL, WP_Query $wp_query) {
113 113
 		if (
114 114
 			$wp_query instanceof WP_Query
115 115
 			&&
@@ -120,11 +120,11 @@  discard block
 block discarded – undo
120 120
 			)
121 121
 		) {
122 122
 			// adds something like ", wp_esp_datetime.* " to WP Query SELECT statement
123
-			$SQL .= ', ' . EEM_Datetime::instance()->table() . '.* ' ;
124
-			if ( $wp_query->is_espresso_event_archive || $wp_query->is_espresso_event_taxonomy ) {
123
+			$SQL .= ', '.EEM_Datetime::instance()->table().'.* ';
124
+			if ($wp_query->is_espresso_event_archive || $wp_query->is_espresso_event_taxonomy) {
125 125
 				// because we only want to retrieve the next upcoming datetime for each event:
126 126
 				// add something like ", MIN( wp_esp_datetime.DTT_EVT_start ) as event_start_date " to WP Query SELECT statement
127
-				$SQL .= ', MIN( ' . EEM_Datetime::instance()->table() . '.DTT_EVT_start ) as event_start_date ' ;
127
+				$SQL .= ', MIN( '.EEM_Datetime::instance()->table().'.DTT_EVT_start ) as event_start_date ';
128 128
 			}
129 129
 		}
130 130
 		return $SQL;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 * @internal  param \WP_Query $WP_Query
142 142
 	 * @return    string
143 143
 	 */
144
-	public function posts_join( $SQL, WP_Query $wp_query ) {
144
+	public function posts_join($SQL, WP_Query $wp_query) {
145 145
 		if (
146 146
 			$wp_query instanceof WP_Query
147 147
 			&&
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 			)
153 153
 		) {
154 154
 			// adds something like " LEFT JOIN wp_esp_datetime ON ( wp_esp_datetime.EVT_ID = wp_posts.ID ) " to WP Query JOIN statement
155
-			$SQL .= ' INNER JOIN ' . EEM_Datetime::instance()->table() . ' ON ( ' . EEM_Event::instance()->table() . '.ID = ' . EEM_Datetime::instance()->table() . '.' . EEM_Event::instance()->primary_key_name() . ' ) ';
155
+			$SQL .= ' INNER JOIN '.EEM_Datetime::instance()->table().' ON ( '.EEM_Event::instance()->table().'.ID = '.EEM_Datetime::instance()->table().'.'.EEM_Event::instance()->primary_key_name().' ) ';
156 156
 		}
157 157
 		return $SQL;
158 158
 	}
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	 * @param WP_Query $wp_query
168 168
 	 * @return    string
169 169
 	 */
170
-	public function posts_where( $SQL, WP_Query $wp_query ) {
170
+	public function posts_where($SQL, WP_Query $wp_query) {
171 171
 //		global $wpdb;
172 172
 		if (
173 173
 			$wp_query instanceof WP_Query
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
 				|| $wp_query->is_espresso_event_taxonomy
178 178
 			)
179 179
 		) {
180
-			if ( ! isset( EE_Registry::instance()->CFG->template_settings->EED_Events_Archive ) || ! isset( EE_Registry::instance()->CFG->template_settings->EED_Events_Archive->display_expired_events ) || ! EE_Registry::instance()->CFG->template_settings->EED_Events_Archive->display_expired_events ) {
181
-				$SQL .=  ' AND ' . EEM_Datetime::instance()->table() . ".DTT_EVT_end > '" . current_time( 'mysql', true ) . "' ";
180
+			if ( ! isset(EE_Registry::instance()->CFG->template_settings->EED_Events_Archive) || ! isset(EE_Registry::instance()->CFG->template_settings->EED_Events_Archive->display_expired_events) || ! EE_Registry::instance()->CFG->template_settings->EED_Events_Archive->display_expired_events) {
181
+				$SQL .= ' AND '.EEM_Datetime::instance()->table().".DTT_EVT_end > '".current_time('mysql', true)."' ";
182 182
 			}
183 183
 		}
184 184
 		return $SQL;
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 	 * @param 	WP_Query $wp_query
195 195
 	 * @return 	string
196 196
 	 */
197
-	public function posts_orderby( $SQL, WP_Query $wp_query ) {
197
+	public function posts_orderby($SQL, WP_Query $wp_query) {
198 198
 		if (
199 199
 			$wp_query instanceof WP_Query
200 200
 			&&
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	 * @param WP_Query $wp_query
219 219
 	 * @return    string
220 220
 	 */
221
-	public function posts_groupby( $SQL, WP_Query $wp_query ) {
221
+	public function posts_groupby($SQL, WP_Query $wp_query) {
222 222
 		if (
223 223
 			$wp_query instanceof WP_Query
224 224
 			&&
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 			// we're joining to the datetimes table, where there can be MANY datetimes for a single event, but we want to only show each event only once
232 232
 			// (whereas if we didn't group them by the post's ID, then we would end up with many repeats)
233 233
 			global $wpdb;
234
-			$SQL = $wpdb->posts . '.ID ';
234
+			$SQL = $wpdb->posts.'.ID ';
235 235
 		}
236 236
 		return $SQL;
237 237
 	}
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 	 * @param WP_Query $wp_query
247 247
 	 * @return    array
248 248
 	 */
249
-	public function the_posts( $posts, WP_Query $wp_query ) {
249
+	public function the_posts($posts, WP_Query $wp_query) {
250 250
 		return $posts;
251 251
 	}
252 252
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * @param      $single
263 263
 	 * @return    string
264 264
 	 */
265
-	public function get_EE_post_type_metadata( $meta_value = NULL, $post_id, $meta_key, $single ) {
265
+	public function get_EE_post_type_metadata($meta_value = NULL, $post_id, $meta_key, $single) {
266 266
 		return $meta_value;
267 267
 	}
268 268
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
caffeinated/modules/recaptcha/EED_Recaptcha.module.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -102,8 +102,8 @@
 block discarded – undo
102 102
 		// use_captcha ?
103 103
 		if (
104 104
 			EE_Registry::instance()->CFG->registration->use_captcha
105
-            && EE_Registry::instance()->REQ->get( 'step', '' ) !== ''
106
-            && ! (
105
+			&& EE_Registry::instance()->REQ->get( 'step', '' ) !== ''
106
+			&& ! (
107 107
 				EE_Registry::instance()->REQ->get( 'step', '' ) === 'payment_options'
108 108
 				&& (boolean) EE_Registry::instance()->REQ->get( 'revisit', false ) === true
109 109
 			)
Please login to merge, or discard this patch.
Spacing   +131 added lines, -132 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 * @return EED_Recaptcha
44 44
 	 */
45 45
 	public static function instance() {
46
-		return parent::get_instance( __CLASS__ );
46
+		return parent::get_instance(__CLASS__);
47 47
 	}
48 48
 
49 49
 
@@ -59,32 +59,32 @@  discard block
 block discarded – undo
59 59
 		if (
60 60
 			EE_Registry::instance()->CFG->registration->use_captcha
61 61
 			&& ! (
62
-				EE_Registry::instance()->REQ->get( 'step', '' ) === 'payment_options'
63
-				&& (boolean) EE_Registry::instance()->REQ->get( 'revisit', false ) === true
62
+				EE_Registry::instance()->REQ->get('step', '') === 'payment_options'
63
+				&& (boolean) EE_Registry::instance()->REQ->get('revisit', false) === true
64 64
 			)
65 65
 		) {
66 66
 			EED_Recaptcha::set_definitions();
67 67
 			EED_Recaptcha::enqueue_styles_and_scripts();
68
-			add_action( 'wp', array( 'EED_Recaptcha', 'set_late_hooks' ), 1, 0 );
68
+			add_action('wp', array('EED_Recaptcha', 'set_late_hooks'), 1, 0);
69 69
 			add_action(
70 70
 				'AHEE__before_spco_whats_next_buttons',
71
-				array( 'EED_Recaptcha', 'display_recaptcha' ), 10, 0
71
+				array('EED_Recaptcha', 'display_recaptcha'), 10, 0
72 72
 			);
73 73
 			add_filter(
74 74
 				'FHEE__EED_Single_Page_Checkout__init___continue_reg',
75
-				array( 'EED_Recaptcha', 'not_a_robot' ), 10
75
+				array('EED_Recaptcha', 'not_a_robot'), 10
76 76
 			);
77 77
 			add_filter(
78 78
 				'FHEE__EE_SPCO_Reg_Step__set_completed___completed',
79
-				array( 'EED_Recaptcha', 'not_a_robot' ), 10
79
+				array('EED_Recaptcha', 'not_a_robot'), 10
80 80
 			);
81 81
 			add_filter(
82 82
 				'FHEE__EE_SPCO_JSON_Response___toString__JSON_response',
83
-				array( 'EED_Recaptcha', 'recaptcha_response' ), 10, 1
83
+				array('EED_Recaptcha', 'recaptcha_response'), 10, 1
84 84
 			);
85 85
 			add_filter(
86 86
 				'FHEE__EED_Recaptcha___bypass_recaptcha__bypass_request_params_array',
87
-				array( 'EED_Recaptcha', 'bypass_recaptcha_for_spco_load_payment_method' ), 10, 1
87
+				array('EED_Recaptcha', 'bypass_recaptcha_for_spco_load_payment_method'), 10, 1
88 88
 			);
89 89
 		}
90 90
 	}
@@ -102,20 +102,20 @@  discard block
 block discarded – undo
102 102
 		// use_captcha ?
103 103
 		if (
104 104
 			EE_Registry::instance()->CFG->registration->use_captcha
105
-            && EE_Registry::instance()->REQ->get( 'step', '' ) !== ''
105
+            && EE_Registry::instance()->REQ->get('step', '') !== ''
106 106
             && ! (
107
-				EE_Registry::instance()->REQ->get( 'step', '' ) === 'payment_options'
108
-				&& (boolean) EE_Registry::instance()->REQ->get( 'revisit', false ) === true
107
+				EE_Registry::instance()->REQ->get('step', '') === 'payment_options'
108
+				&& (boolean) EE_Registry::instance()->REQ->get('revisit', false) === true
109 109
 			)
110 110
 		) {
111 111
 			EED_Recaptcha::enqueue_styles_and_scripts();
112
-			add_filter( 'FHEE__EED_Single_Page_Checkout__init___continue_reg', array( 'EED_Recaptcha', 'not_a_robot' ), 10 );
113
-			add_filter( 'FHEE__EE_SPCO_Reg_Step__set_completed___completed', array( 'EED_Recaptcha', 'not_a_robot' ), 10 );
114
-			add_filter( 'FHEE__EE_SPCO_JSON_Response___toString__JSON_response', array( 'EED_Recaptcha', 'recaptcha_response' ), 10, 1 );
112
+			add_filter('FHEE__EED_Single_Page_Checkout__init___continue_reg', array('EED_Recaptcha', 'not_a_robot'), 10);
113
+			add_filter('FHEE__EE_SPCO_Reg_Step__set_completed___completed', array('EED_Recaptcha', 'not_a_robot'), 10);
114
+			add_filter('FHEE__EE_SPCO_JSON_Response___toString__JSON_response', array('EED_Recaptcha', 'recaptcha_response'), 10, 1);
115 115
 		}
116 116
 		// admin settings
117
-		add_action( 'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template', array( 'EED_Recaptcha', 'admin_settings' ), 10, 1 );
118
-		add_filter( 'FHEE__Extend_Registration_Form_Admin_Page___update_reg_form_settings__CFG_registration', array( 'EED_Recaptcha', 'update_admin_settings' ), 10, 1 );
117
+		add_action('AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template', array('EED_Recaptcha', 'admin_settings'), 10, 1);
118
+		add_filter('FHEE__Extend_Registration_Form_Admin_Page___update_reg_form_settings__CFG_registration', array('EED_Recaptcha', 'update_admin_settings'), 10, 1);
119 119
 	}
120 120
 
121 121
 
@@ -127,11 +127,11 @@  discard block
 block discarded – undo
127 127
 	 *  @return 	void
128 128
 	 */
129 129
 	public static function set_definitions() {
130
-		if ( is_user_logged_in() ) {
130
+		if (is_user_logged_in()) {
131 131
 			EED_Recaptcha::$_not_a_robot = true;
132 132
 		}
133
-		define( 'RECAPTCHA_BASE_PATH', rtrim( str_replace( array( '\\', '/' ), DS, plugin_dir_path( __FILE__ )), DS ) . DS );
134
-		define( 'RECAPTCHA_BASE_URL', plugin_dir_url( __FILE__ ));
133
+		define('RECAPTCHA_BASE_PATH', rtrim(str_replace(array('\\', '/'), DS, plugin_dir_path(__FILE__)), DS).DS);
134
+		define('RECAPTCHA_BASE_URL', plugin_dir_url(__FILE__));
135 135
 	}
136 136
 
137 137
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	public static function set_late_hooks() {
146 146
 		add_filter(
147 147
 			'FHEE__Single_Page_Checkout__translate_js_strings__ajax_submit',
148
-			array( 'EED_Recaptcha', 'not_a_robot' )
148
+			array('EED_Recaptcha', 'not_a_robot')
149 149
 		);
150 150
 	}
151 151
 
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
 	 *  @return 	void
159 159
 	 */
160 160
 	public static function enqueue_styles_and_scripts() {
161
-		wp_register_script( 'espresso_recaptcha', RECAPTCHA_BASE_URL . 'scripts' . DS . 'espresso_recaptcha.js', array( 'single_page_checkout' ), EVENT_ESPRESSO_VERSION, TRUE );
162
-		wp_register_script( 'google_recaptcha', 'https://www.google.com/recaptcha/api.js?hl=' . EE_Registry::instance()->CFG->registration->recaptcha_language, array( 'espresso_recaptcha' ), EVENT_ESPRESSO_VERSION, TRUE );
163
-		EE_Registry::$i18n_js_strings['no_SPCO_error'] = __( 'It appears the Single Page Checkout javascript was not loaded properly! Please refresh the page and try again or contact support.', 'event_espresso' );
164
-		EE_Registry::$i18n_js_strings['no_recaptcha_error'] = __( 'There appears to be a problem with the reCAPTCHA configuration! Please check the admin settings or contact support.', 'event_espresso' );
165
-		EE_Registry::$i18n_js_strings['recaptcha_fail'] = __( 'Please complete the anti-spam test before proceeding.', 'event_espresso' );
161
+		wp_register_script('espresso_recaptcha', RECAPTCHA_BASE_URL.'scripts'.DS.'espresso_recaptcha.js', array('single_page_checkout'), EVENT_ESPRESSO_VERSION, TRUE);
162
+		wp_register_script('google_recaptcha', 'https://www.google.com/recaptcha/api.js?hl='.EE_Registry::instance()->CFG->registration->recaptcha_language, array('espresso_recaptcha'), EVENT_ESPRESSO_VERSION, TRUE);
163
+		EE_Registry::$i18n_js_strings['no_SPCO_error'] = __('It appears the Single Page Checkout javascript was not loaded properly! Please refresh the page and try again or contact support.', 'event_espresso');
164
+		EE_Registry::$i18n_js_strings['no_recaptcha_error'] = __('There appears to be a problem with the reCAPTCHA configuration! Please check the admin settings or contact support.', 'event_espresso');
165
+		EE_Registry::$i18n_js_strings['recaptcha_fail'] = __('Please complete the anti-spam test before proceeding.', 'event_espresso');
166 166
 	}
167 167
 
168 168
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	 * @access    public
174 174
 	 * @param \WP $WP
175 175
 	 */
176
-	public function run( $WP ) {
176
+	public function run($WP) {
177 177
 	}
178 178
 
179 179
 
@@ -183,8 +183,7 @@  discard block
 block discarded – undo
183 183
 	 *  @return boolean
184 184
 	 */
185 185
 	public static function not_a_robot() {
186
-		$not_a_robot = is_bool( EED_Recaptcha::$_not_a_robot ) ? EED_Recaptcha::$_not_a_robot :
187
-			EED_Recaptcha::recaptcha_passed();
186
+		$not_a_robot = is_bool(EED_Recaptcha::$_not_a_robot) ? EED_Recaptcha::$_not_a_robot : EED_Recaptcha::recaptcha_passed();
188 187
 		return $not_a_robot;
189 188
 	}
190 189
 
@@ -200,22 +199,22 @@  discard block
 block discarded – undo
200 199
 	 */
201 200
 	public static function display_recaptcha() {
202 201
 		// logged in means you have already passed a turing test of sorts
203
-		if ( is_user_logged_in() ) {
202
+		if (is_user_logged_in()) {
204 203
 			return;
205 204
 		}
206 205
 		// don't display if not using recaptcha or user is logged in
207
-		if ( EE_Registry::instance()->CFG->registration->use_captcha ) {
206
+		if (EE_Registry::instance()->CFG->registration->use_captcha) {
208 207
 			// only display if they have NOT passed the test yet
209
-			if ( ! EED_Recaptcha::$_not_a_robot ) {
208
+			if ( ! EED_Recaptcha::$_not_a_robot) {
210 209
 				EEH_Template::display_template(
211
-					RECAPTCHA_BASE_PATH . DS . 'templates' . DS . 'recaptcha.template.php',
210
+					RECAPTCHA_BASE_PATH.DS.'templates'.DS.'recaptcha.template.php',
212 211
 					array(
213 212
 						'recaptcha_publickey' 	=> EE_Registry::instance()->CFG->registration->recaptcha_publickey,
214 213
 						'recaptcha_theme' 		=> EE_Registry::instance()->CFG->registration->recaptcha_theme,
215 214
 						'recaptcha_type' 			=> EE_Registry::instance()->CFG->registration->recaptcha_type
216 215
 					)
217 216
 				);
218
-				wp_enqueue_script( 'google_recaptcha' );
217
+				wp_enqueue_script('google_recaptcha');
219 218
 			}
220 219
 		}
221 220
 	}
@@ -246,17 +245,17 @@  discard block
 block discarded – undo
246 245
 	 */
247 246
 	public static function recaptcha_passed() {
248 247
 		// logged in means you have already passed a turing test of sorts
249
-		if ( is_user_logged_in() || EED_Recaptcha::_bypass_recaptcha() ) {
248
+		if (is_user_logged_in() || EED_Recaptcha::_bypass_recaptcha()) {
250 249
 			return TRUE;
251 250
 		}
252 251
 		// was test already passed?
253
-		$recaptcha_passed = EE_Registry::instance()->SSN->get_session_data( 'recaptcha_passed' );
254
-		$recaptcha_passed = filter_var( $recaptcha_passed, FILTER_VALIDATE_BOOLEAN );
252
+		$recaptcha_passed = EE_Registry::instance()->SSN->get_session_data('recaptcha_passed');
253
+		$recaptcha_passed = filter_var($recaptcha_passed, FILTER_VALIDATE_BOOLEAN);
255 254
 		// verify recaptcha
256 255
 		EED_Recaptcha::_get_recaptcha_response();
257
-		if ( ! $recaptcha_passed && EED_Recaptcha::$_recaptcha_response ) {
256
+		if ( ! $recaptcha_passed && EED_Recaptcha::$_recaptcha_response) {
258 257
 			$recaptcha_passed = EED_Recaptcha::_process_recaptcha_response();
259
-			EE_Registry::instance()->SSN->set_session_data( array( 'recaptcha_passed' => $recaptcha_passed ));
258
+			EE_Registry::instance()->SSN->set_session_data(array('recaptcha_passed' => $recaptcha_passed));
260 259
 		}
261 260
 		EED_Recaptcha::$_not_a_robot = $recaptcha_passed;
262 261
 		return $recaptcha_passed;
@@ -271,8 +270,8 @@  discard block
 block discarded – undo
271 270
 	 * @param array $recaptcha_response
272 271
 	 * @return boolean
273 272
 	 */
274
-	public static function recaptcha_response( $recaptcha_response = array() ) {
275
-		if ( EED_Recaptcha::_bypass_recaptcha() ) {
273
+	public static function recaptcha_response($recaptcha_response = array()) {
274
+		if (EED_Recaptcha::_bypass_recaptcha()) {
276 275
 			$recaptcha_response['bypass_recaptcha'] = TRUE;
277 276
 			$recaptcha_response['recaptcha_passed'] = TRUE;
278 277
 		} else {
@@ -292,16 +291,16 @@  discard block
 block discarded – undo
292 291
 	 */
293 292
 	private static function _bypass_recaptcha() {
294 293
 		// an array of key value pairs that must match exactly with the incoming request, in order to bypass recaptcha for the current request ONLY
295
-		$bypass_request_params_array = apply_filters( 'FHEE__EED_Recaptcha___bypass_recaptcha__bypass_request_params_array', array() );
294
+		$bypass_request_params_array = apply_filters('FHEE__EED_Recaptcha___bypass_recaptcha__bypass_request_params_array', array());
296 295
 		// does $bypass_request_params_array have any values ?
297
-		if ( empty( $bypass_request_params_array )) {
296
+		if (empty($bypass_request_params_array)) {
298 297
 			return FALSE;
299 298
 		}
300 299
 		// initially set bypass to TRUE
301 300
 		$bypass_recaptcha = TRUE;
302
-		foreach ( $bypass_request_params_array as $key => $value ) {
301
+		foreach ($bypass_request_params_array as $key => $value) {
303 302
 			// if $key is not found or value doesn't match exactly, then toggle bypass to FALSE, otherwise carry over it's value. This way, one missed setting results in no bypass
304
-			$bypass_recaptcha = isset( $_REQUEST[ $key ] ) && $_REQUEST[ $key ] === $value ? $bypass_recaptcha : FALSE;
303
+			$bypass_recaptcha = isset($_REQUEST[$key]) && $_REQUEST[$key] === $value ? $bypass_recaptcha : FALSE;
305 304
 		}
306 305
 		return $bypass_recaptcha;
307 306
 	}
@@ -316,7 +315,7 @@  discard block
 block discarded – undo
316 315
 	 * 	@return 	boolean
317 316
 	 */
318 317
 	private static function _get_recaptcha_response() {
319
-		EED_Recaptcha::$_recaptcha_response = EE_Registry::instance()->REQ->get( 'g-recaptcha-response', false );
318
+		EED_Recaptcha::$_recaptcha_response = EE_Registry::instance()->REQ->get('g-recaptcha-response', false);
320 319
 	}
321 320
 
322 321
 
@@ -330,26 +329,26 @@  discard block
 block discarded – undo
330 329
 	 */
331 330
 	private static function _process_recaptcha_response() {
332 331
 		// verify library is loaded
333
-		if ( ! class_exists( '\\ReCaptcha\\ReCaptcha' )) {
334
-			require_once( RECAPTCHA_BASE_PATH . DS . 'autoload.php' );
332
+		if ( ! class_exists('\\ReCaptcha\\ReCaptcha')) {
333
+			require_once(RECAPTCHA_BASE_PATH.DS.'autoload.php');
335 334
 		}
336 335
 		// The response from reCAPTCHA
337 336
 		EED_Recaptcha::_get_recaptcha_response();
338 337
 		$recaptcha_response = EED_Recaptcha::$_recaptcha_response;
339 338
 		// Was there a reCAPTCHA response?
340
-		if ( $recaptcha_response ) {
339
+		if ($recaptcha_response) {
341 340
 			// if allow_url_fopen is Off, then set a different request method
342
-			$request_method = ! ini_get( 'allow_url_fopen' ) ? new \ReCaptcha\RequestMethod\SocketPost() : null;
341
+			$request_method = ! ini_get('allow_url_fopen') ? new \ReCaptcha\RequestMethod\SocketPost() : null;
343 342
 			$recaptcha = new \ReCaptcha\ReCaptcha(
344 343
 				EE_Registry::instance()->CFG->registration->recaptcha_privatekey,
345 344
 				$request_method
346 345
 			);
347 346
 			$recaptcha_response = $recaptcha->verify(
348 347
 				EED_Recaptcha::$_recaptcha_response,
349
-				$_SERVER[ 'REMOTE_ADDR' ]
348
+				$_SERVER['REMOTE_ADDR']
350 349
 			);
351 350
 		}
352
-		if ( $recaptcha_response instanceof \ReCaptcha\Response && $recaptcha_response->isSuccess() ) {
351
+		if ($recaptcha_response instanceof \ReCaptcha\Response && $recaptcha_response->isSuccess()) {
353 352
 			return TRUE;
354 353
 		}
355 354
 		// sorry... it appears you can't don't know what soup or hamburgers are !!!
@@ -393,12 +392,12 @@  discard block
 block discarded – undo
393 392
 				'subsections' 			=> apply_filters(
394 393
 					'FHEE__EED_Recaptcha___recaptcha_settings_form__form_subsections',
395 394
 					array(
396
-						'main_settings_hdr' 				=> new EE_Form_Section_HTML( EEH_HTML::h2( __( 'reCAPTCHA Anti-spam Settings', 'event_espresso' ) . EEH_Template::get_help_tab_link( 'recaptcha_info' ))),
395
+						'main_settings_hdr' 				=> new EE_Form_Section_HTML(EEH_HTML::h2(__('reCAPTCHA Anti-spam Settings', 'event_espresso').EEH_Template::get_help_tab_link('recaptcha_info'))),
397 396
 						'main_settings' 						=> EED_Recaptcha::_recaptcha_main_settings(),
398
-						'appearance_settings_hdr' 	=> new EE_Form_Section_HTML( EEH_HTML::h2( __( 'reCAPTCHA Appearance', 'event_espresso' ) )),
397
+						'appearance_settings_hdr' 	=> new EE_Form_Section_HTML(EEH_HTML::h2(__('reCAPTCHA Appearance', 'event_espresso'))),
399 398
 						'appearance_settings' 			=> EED_Recaptcha::_recaptcha_appearance_settings(),
400 399
 						// 'recaptcha_example' 				=> new EE_Form_Section_HTML( EED_Recaptcha::display_recaptcha() ),
401
-						'required_fields_note' 			=> new EE_Form_Section_HTML( EEH_HTML::p( __( 'All fields marked with a * are required fields', 'event_espresso' ), '', 'grey-text' ))
400
+						'required_fields_note' 			=> new EE_Form_Section_HTML(EEH_HTML::p(__('All fields marked with a * are required fields', 'event_espresso'), '', 'grey-text'))
402 401
 					)
403 402
 				)
404 403
 			)
@@ -425,28 +424,28 @@  discard block
 block discarded – undo
425 424
 					array(
426 425
 						'use_captcha' 				=> new EE_Yes_No_Input(
427 426
 							array(
428
-								'html_label_text'	 	=> __( 'Use reCAPTCHA', 'event_espresso' ),
427
+								'html_label_text'	 	=> __('Use reCAPTCHA', 'event_espresso'),
429 428
 								'html_help_text' 		=> sprintf(
430
-									__( 'reCAPTCHA is a free service that  protects your website from spam and abuse. It employs advanced risk analysis technology to separate humans from abusive actors. Sign up %1$shere%2$s to receive your Public and Private keys.', 'event_espresso' ),
429
+									__('reCAPTCHA is a free service that  protects your website from spam and abuse. It employs advanced risk analysis technology to separate humans from abusive actors. Sign up %1$shere%2$s to receive your Public and Private keys.', 'event_espresso'),
431 430
 									'<a href="https://www.google.com/recaptcha/intro/index.html">',
432 431
 									'</a>'
433 432
 								),
434
-								'default' 								=> isset( EE_Registry::instance()->CFG->registration->use_captcha ) ? EE_Registry::instance()->CFG->registration->use_captcha : FALSE,
433
+								'default' 								=> isset(EE_Registry::instance()->CFG->registration->use_captcha) ? EE_Registry::instance()->CFG->registration->use_captcha : FALSE,
435 434
 								'display_html_label_text' 	=> FALSE
436 435
 							)
437 436
 						),
438 437
 						'recaptcha_publickey' 		=> new EE_Text_Input(
439 438
 							array(
440
-								'html_label_text'	 	=> __( 'Site Key', 'event_espresso' ),
441
-								'html_help_text' 		=> __( 'The site key is used to display the widget on your site.', 'event_espresso' ),
442
-								'default' 					=> isset( EE_Registry::instance()->CFG->registration->recaptcha_publickey ) ? stripslashes( EE_Registry::instance()->CFG->registration->recaptcha_publickey ) : ''
439
+								'html_label_text'	 	=> __('Site Key', 'event_espresso'),
440
+								'html_help_text' 		=> __('The site key is used to display the widget on your site.', 'event_espresso'),
441
+								'default' 					=> isset(EE_Registry::instance()->CFG->registration->recaptcha_publickey) ? stripslashes(EE_Registry::instance()->CFG->registration->recaptcha_publickey) : ''
443 442
 							)
444 443
 						),
445 444
 						'recaptcha_privatekey' 		=> new EE_Text_Input(
446 445
 							array(
447
-								'html_label_text'	 	=> __( 'Secret Key', 'event_espresso' ),
448
-								'html_help_text' 		=> __( 'The secret key authorizes communication between your application backend and the reCAPTCHA server to verify the user\'s response. The secret key needs to be kept safe for security purposes.', 'event_espresso' ),
449
-								'default' 					=> isset( EE_Registry::instance()->CFG->registration->recaptcha_privatekey ) ? stripslashes( EE_Registry::instance()->CFG->registration->recaptcha_privatekey ) : ''
446
+								'html_label_text'	 	=> __('Secret Key', 'event_espresso'),
447
+								'html_help_text' 		=> __('The secret key authorizes communication between your application backend and the reCAPTCHA server to verify the user\'s response. The secret key needs to be kept safe for security purposes.', 'event_espresso'),
448
+								'default' 					=> isset(EE_Registry::instance()->CFG->registration->recaptcha_privatekey) ? stripslashes(EE_Registry::instance()->CFG->registration->recaptcha_privatekey) : ''
450 449
 							)
451 450
 						)
452 451
 					)
@@ -478,81 +477,81 @@  discard block
 block discarded – undo
478 477
 					array(
479 478
 						'recaptcha_theme' 		=> new EE_Radio_Button_Input(
480 479
 							array(
481
-								'light' => __( 'Light', 'event_espresso' ),
482
-								'dark' => __( 'Dark', 'event_espresso' )
480
+								'light' => __('Light', 'event_espresso'),
481
+								'dark' => __('Dark', 'event_espresso')
483 482
 							),
484 483
 							array(
485
-								'html_label_text'	 	=> __( 'Theme', 'event_espresso' ),
486
-								'html_help_text' 		=> __( 'The color theme of the widget.', 'event_espresso' ),
487
-								'default' 					=> isset( EE_Registry::instance()->CFG->registration->recaptcha_theme ) ? EE_Registry::instance()->CFG->registration->recaptcha_theme : 'light',
484
+								'html_label_text'	 	=> __('Theme', 'event_espresso'),
485
+								'html_help_text' 		=> __('The color theme of the widget.', 'event_espresso'),
486
+								'default' 					=> isset(EE_Registry::instance()->CFG->registration->recaptcha_theme) ? EE_Registry::instance()->CFG->registration->recaptcha_theme : 'light',
488 487
 								'display_html_label_text' => FALSE
489 488
 							)
490 489
 						),
491 490
 						'recaptcha_type' 		=> new EE_Radio_Button_Input(
492 491
 							array(
493
-								'image' => __( 'Image', 'event_espresso' ),
494
-								'audio' => __( 'Audio', 'event_espresso' )
492
+								'image' => __('Image', 'event_espresso'),
493
+								'audio' => __('Audio', 'event_espresso')
495 494
 							),
496 495
 							array(
497
-								'html_label_text'	 	=> __( 'Type', 'event_espresso' ),
498
-								'html_help_text' 		=> __( 'The type of CAPTCHA to serve.', 'event_espresso' ),
499
-								'default' 					=> isset( EE_Registry::instance()->CFG->registration->recaptcha_type ) ? EE_Registry::instance()->CFG->registration->recaptcha_type : 'image',
496
+								'html_label_text'	 	=> __('Type', 'event_espresso'),
497
+								'html_help_text' 		=> __('The type of CAPTCHA to serve.', 'event_espresso'),
498
+								'default' 					=> isset(EE_Registry::instance()->CFG->registration->recaptcha_type) ? EE_Registry::instance()->CFG->registration->recaptcha_type : 'image',
500 499
 								'display_html_label_text' =>FALSE
501 500
 							)
502 501
 						),
503 502
 						'recaptcha_language' 		=> new EE_Select_Input(
504 503
 							array(
505
-								 'ar' 			=> __( 'Arabic', 'event_espresso' ),
506
-								 'bg' 		=> __( 'Bulgarian', 'event_espresso' ),
507
-								 'ca' 			=> __( 'Catalan', 'event_espresso' ),
508
-								 'zh-CN' 	=>  __( 'Chinese (Simplified)', 'event_espresso' ),
509
-								 'zh-TW' 	=>  __( 'Chinese (Traditional)	', 'event_espresso' ),
510
-								 'hr' 			=> __( 'Croatian', 'event_espresso' ),
511
-								 'cs' 			=> __( 'Czech', 'event_espresso' ),
512
-								 'da' 			=> __( 'Danish', 'event_espresso' ),
513
-								 'nl' 			=> __( 'Dutch', 'event_espresso' ),
514
-								 'en-GB' 	=>  __( 'English (UK)', 'event_espresso' ),
515
-								 'en' 			=> __( 'English (US)', 'event_espresso' ),
516
-								 'fil' 			=> __( 'Filipino', 'event_espresso' ),
517
-								 'fi' 			=> __( 'Finnish', 'event_espresso' ),
518
-								 'fr' 			=> __( 'French', 'event_espresso' ),
519
-								 'fr-CA' 	=>  __( 'French (Canadian)', 'event_espresso' ),
520
-								 'de' 			=> __( 'German', 'event_espresso' ),
521
-								 'de-AT' 	=>  __( 'German (Austria)', 'event_espresso' ),
522
-								 'de-CH' 	=>  __( 'German (Switzerland)', 'event_espresso' ),
523
-								 'el' 			=> __( 'Greek', 'event_espresso' ),
524
-								 'iw' 			=> __( 'Hebrew', 'event_espresso' ),
525
-								 'hi' 			=> __( 'Hindi', 'event_espresso' ),
526
-								 'hu' 		=> __( 'Hungarian', 'event_espresso' ),
527
-								 'id' 			=> __( 'Indonesian', 'event_espresso' ),
528
-								 'it' 			=> __( 'Italian', 'event_espresso' ),
529
-								 'ja' 			=> __( 'Japanese', 'event_espresso' ),
530
-								 'ko' 			=> __( 'Korean', 'event_espresso' ),
531
-								 'lv' 			=> __( 'Latvian', 'event_espresso' ),
532
-								 'lt' 			=> __( 'Lithuanian', 'event_espresso' ),
533
-								 'no' 		=> __( 'Norwegian', 'event_espresso' ),
534
-								 'fa' 			=> __( 'Persian', 'event_espresso' ),
535
-								 'pl' 			=> __( 'Polish', 'event_espresso' ),
536
-								 'pt' 			=> __( 'Portuguese', 'event_espresso' ),
537
-								 'pt-BR' 	=>  __( 'Portuguese (Brazil)', 'event_espresso' ),
538
-								 'pt-PT' 	=>  __( 'Portuguese (Portugal)', 'event_espresso' ),
539
-								 'ro' 			=> __( 'Romanian', 'event_espresso' ),
540
-								 'ru' 			=> __( 'Russian', 'event_espresso' ),
541
-								 'sr' 			=> __( 'Serbian', 'event_espresso' ),
542
-								 'sk' 			=> __( 'Slovak', 'event_espresso' ),
543
-								 'sl' 			=> __( 'Slovenian', 'event_espresso' ),
544
-								 'es' 			=> __( 'Spanish', 'event_espresso' ),
545
-								 'es-419' 	=>  __( 'Spanish (Latin America)', 'event_espresso' ),
546
-								 'sv' 			=> __( 'Swedish', 'event_espresso' ),
547
-								 'th' 			=> __( 'Thai', 'event_espresso' ),
548
-								 'tr' 			=> __( 'Turkish', 'event_espresso' ),
549
-								 'uk' 			=> __( 'Ukrainian', 'event_espresso' ),
550
-								 'vi' 			=> __( 'Vietnamese', 'event_espresso')
504
+								 'ar' 			=> __('Arabic', 'event_espresso'),
505
+								 'bg' 		=> __('Bulgarian', 'event_espresso'),
506
+								 'ca' 			=> __('Catalan', 'event_espresso'),
507
+								 'zh-CN' 	=>  __('Chinese (Simplified)', 'event_espresso'),
508
+								 'zh-TW' 	=>  __('Chinese (Traditional)	', 'event_espresso'),
509
+								 'hr' 			=> __('Croatian', 'event_espresso'),
510
+								 'cs' 			=> __('Czech', 'event_espresso'),
511
+								 'da' 			=> __('Danish', 'event_espresso'),
512
+								 'nl' 			=> __('Dutch', 'event_espresso'),
513
+								 'en-GB' 	=>  __('English (UK)', 'event_espresso'),
514
+								 'en' 			=> __('English (US)', 'event_espresso'),
515
+								 'fil' 			=> __('Filipino', 'event_espresso'),
516
+								 'fi' 			=> __('Finnish', 'event_espresso'),
517
+								 'fr' 			=> __('French', 'event_espresso'),
518
+								 'fr-CA' 	=>  __('French (Canadian)', 'event_espresso'),
519
+								 'de' 			=> __('German', 'event_espresso'),
520
+								 'de-AT' 	=>  __('German (Austria)', 'event_espresso'),
521
+								 'de-CH' 	=>  __('German (Switzerland)', 'event_espresso'),
522
+								 'el' 			=> __('Greek', 'event_espresso'),
523
+								 'iw' 			=> __('Hebrew', 'event_espresso'),
524
+								 'hi' 			=> __('Hindi', 'event_espresso'),
525
+								 'hu' 		=> __('Hungarian', 'event_espresso'),
526
+								 'id' 			=> __('Indonesian', 'event_espresso'),
527
+								 'it' 			=> __('Italian', 'event_espresso'),
528
+								 'ja' 			=> __('Japanese', 'event_espresso'),
529
+								 'ko' 			=> __('Korean', 'event_espresso'),
530
+								 'lv' 			=> __('Latvian', 'event_espresso'),
531
+								 'lt' 			=> __('Lithuanian', 'event_espresso'),
532
+								 'no' 		=> __('Norwegian', 'event_espresso'),
533
+								 'fa' 			=> __('Persian', 'event_espresso'),
534
+								 'pl' 			=> __('Polish', 'event_espresso'),
535
+								 'pt' 			=> __('Portuguese', 'event_espresso'),
536
+								 'pt-BR' 	=>  __('Portuguese (Brazil)', 'event_espresso'),
537
+								 'pt-PT' 	=>  __('Portuguese (Portugal)', 'event_espresso'),
538
+								 'ro' 			=> __('Romanian', 'event_espresso'),
539
+								 'ru' 			=> __('Russian', 'event_espresso'),
540
+								 'sr' 			=> __('Serbian', 'event_espresso'),
541
+								 'sk' 			=> __('Slovak', 'event_espresso'),
542
+								 'sl' 			=> __('Slovenian', 'event_espresso'),
543
+								 'es' 			=> __('Spanish', 'event_espresso'),
544
+								 'es-419' 	=>  __('Spanish (Latin America)', 'event_espresso'),
545
+								 'sv' 			=> __('Swedish', 'event_espresso'),
546
+								 'th' 			=> __('Thai', 'event_espresso'),
547
+								 'tr' 			=> __('Turkish', 'event_espresso'),
548
+								 'uk' 			=> __('Ukrainian', 'event_espresso'),
549
+								 'vi' 			=> __('Vietnamese', 'event_espresso')
551 550
 							),
552 551
 							array(
553
-								'html_label_text'	 	=> __( 'Language', 'event_espresso' ),
554
-								'html_help_text' 		=> __( 'Forces the widget to render in a specific language.', 'event_espresso' ),
555
-								'default' 					=> isset( EE_Registry::instance()->CFG->registration->recaptcha_language ) ? EE_Registry::instance()->CFG->registration->recaptcha_language : 'en'
552
+								'html_label_text'	 	=> __('Language', 'event_espresso'),
553
+								'html_help_text' 		=> __('Forces the widget to render in a specific language.', 'event_espresso'),
554
+								'default' 					=> isset(EE_Registry::instance()->CFG->registration->recaptcha_language) ? EE_Registry::instance()->CFG->registration->recaptcha_language : 'en'
556 555
 							)
557 556
 						)
558 557
 					)
@@ -600,25 +599,25 @@  discard block
 block discarded – undo
600 599
 	 * @param EE_Registration_Config $EE_Registration_Config
601 600
 	 * @return array
602 601
 	 */
603
-	public static function update_admin_settings( EE_Registration_Config $EE_Registration_Config ) {
602
+	public static function update_admin_settings(EE_Registration_Config $EE_Registration_Config) {
604 603
 		try {
605 604
 			$recaptcha_settings_form = EED_Recaptcha::_recaptcha_settings_form();
606 605
 			// if not displaying a form, then check for form submission
607
-			if ( $recaptcha_settings_form->was_submitted() ) {
606
+			if ($recaptcha_settings_form->was_submitted()) {
608 607
 				// capture form data
609 608
 				$recaptcha_settings_form->receive_form_submission();
610 609
 				// validate form data
611
-				if ( $recaptcha_settings_form->is_valid() ) {
610
+				if ($recaptcha_settings_form->is_valid()) {
612 611
 					// grab validated data from form
613 612
 					$valid_data = $recaptcha_settings_form->valid_data();
614 613
 					// user proofing recaptcha:  If Use reCAPTCHA is set to yes but we dont' have site or secret keys then set Use reCAPTCHA to FALSE and give error message.
615 614
 					if (
616
-						apply_filters( 'FHEE__Extend_Registration_Form_Admin_Page__check_for_recaptcha_keys', TRUE, $EE_Registration_Config )
615
+						apply_filters('FHEE__Extend_Registration_Form_Admin_Page__check_for_recaptcha_keys', TRUE, $EE_Registration_Config)
617 616
 						&& $valid_data['main_settings']['use_captcha']
618
-						&& ( ! $EE_Registration_Config->use_captcha && ( empty( $valid_data['main_settings']['recaptcha_publickey'] ) || empty( $valid_data['main_settings']['recaptcha_privatekey'] )))
617
+						&& ( ! $EE_Registration_Config->use_captcha && (empty($valid_data['main_settings']['recaptcha_publickey']) || empty($valid_data['main_settings']['recaptcha_privatekey'])))
619 618
 					) {
620 619
 						$valid_data['main_settings']['use_captcha'] = FALSE;
621
-						EE_Error::add_error( __('The use reCAPTCHA setting has been reset to "no". In order to enable the reCAPTCHA service, you must enter a Site Key and Secret Key.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__ );
620
+						EE_Error::add_error(__('The use reCAPTCHA setting has been reset to "no". In order to enable the reCAPTCHA service, you must enter a Site Key and Secret Key.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
622 621
 					}
623 622
 					$EE_Registration_Config->use_captcha = $valid_data['main_settings']['use_captcha'];
624 623
 					$EE_Registration_Config->recaptcha_publickey = $valid_data['main_settings']['recaptcha_publickey'];
@@ -627,12 +626,12 @@  discard block
 block discarded – undo
627 626
 					$EE_Registration_Config->recaptcha_theme = $valid_data['appearance_settings']['recaptcha_theme'];
628 627
 					$EE_Registration_Config->recaptcha_language = $valid_data['appearance_settings']['recaptcha_language'];
629 628
 				} else {
630
-					if ( $recaptcha_settings_form->submission_error_message() != '' ) {
631
-						EE_Error::add_error( $recaptcha_settings_form->submission_error_message(), __FILE__, __FUNCTION__, __LINE__ );
629
+					if ($recaptcha_settings_form->submission_error_message() != '') {
630
+						EE_Error::add_error($recaptcha_settings_form->submission_error_message(), __FILE__, __FUNCTION__, __LINE__);
632 631
 					}
633 632
 				}
634 633
 			}
635
-		} catch( EE_Error $e ) {
634
+		} catch (EE_Error $e) {
636 635
 			$e->get_error();
637 636
 		}
638 637
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
modules/ticket_selector/TicketSelectorIframeEmbedButton.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -17,27 +17,27 @@
 block discarded – undo
17 17
 class TicketSelectorIframeEmbedButton extends IframeEmbedButton
18 18
 {
19 19
 
20
-    /**
21
-     * TicketSelectorIframeEmbedButton constructor.
22
-     */
23
-    public function __construct()
24
-    {
25
-        parent::__construct(
26
-            esc_html__( 'Ticket Selector', 'event_espresso' ),
27
-            'ticket_selector'
28
-        );
29
-    }
30
-
31
-
32
-
33
-    /**
34
-     * Adds an iframe embed code button to the Event editor.
35
-     */
36
-    public function addEventEditorIframeEmbedButton()
37
-    {
38
-        // add button for iframe code to event editor.
39
-        $this->addEventEditorIframeEmbedButtonFilter();
40
-    }
20
+	/**
21
+	 * TicketSelectorIframeEmbedButton constructor.
22
+	 */
23
+	public function __construct()
24
+	{
25
+		parent::__construct(
26
+			esc_html__( 'Ticket Selector', 'event_espresso' ),
27
+			'ticket_selector'
28
+		);
29
+	}
30
+
31
+
32
+
33
+	/**
34
+	 * Adds an iframe embed code button to the Event editor.
35
+	 */
36
+	public function addEventEditorIframeEmbedButton()
37
+	{
38
+		// add button for iframe code to event editor.
39
+		$this->addEventEditorIframeEmbedButtonFilter();
40
+	}
41 41
 
42 42
 
43 43
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 use EventEspresso\core\libraries\iframe_display\IframeEmbedButton;
5 5
 
6
-defined( 'ABSPATH' ) || exit;
6
+defined('ABSPATH') || exit;
7 7
 
8 8
 
9 9
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     public function __construct()
24 24
     {
25 25
         parent::__construct(
26
-            esc_html__( 'Ticket Selector', 'event_espresso' ),
26
+            esc_html__('Ticket Selector', 'event_espresso'),
27 27
             'ticket_selector'
28 28
         );
29 29
     }
Please login to merge, or discard this patch.
core/Factory.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 
4 4
 use EventEspresso\core\libraries\iframe_display\Iframe;
5 5
 
6
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
7
-	exit( 'No direct script access allowed' );
6
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
7
+	exit('No direct script access allowed');
8 8
 }
9 9
 
10 10
 
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 	 * @return mixed|null
27 27
 	 * @throws \EE_Error
28 28
 	 */
29
-	public static function create( $class_name, $arguments = array() ) {
30
-		if ( empty( $class_name ) ) {
29
+	public static function create($class_name, $arguments = array()) {
30
+		if (empty($class_name)) {
31 31
 			throw new \EE_Error(
32
-				__( 'You must provide a class name in order to instantiate it.', 'event_espresso' )
32
+				__('You must provide a class name in order to instantiate it.', 'event_espresso')
33 33
 			);
34 34
 		}
35 35
 		// if ( ! class_exists( $class_name ) ) {
@@ -41,20 +41,20 @@  discard block
 block discarded – undo
41 41
 		// 	);
42 42
 		// }
43 43
 		$object = null;
44
-		switch ( $class_name ) {
44
+		switch ($class_name) {
45 45
 
46 46
 			case 'EE_Request' :
47
-				$object = new \EE_Request( $_GET, $_POST, $_COOKIE );
47
+				$object = new \EE_Request($_GET, $_POST, $_COOKIE);
48 48
 				break;
49 49
 
50 50
 			case 'Iframe' :
51
-				$title = isset( $arguments['title'] ) ? $arguments['title'] : null;
52
-				$content = isset( $arguments['content'] ) ? $arguments['content'] : null;
53
-				$object = new Iframe( $title, $content );
51
+				$title = isset($arguments['title']) ? $arguments['title'] : null;
52
+				$content = isset($arguments['content']) ? $arguments['content'] : null;
53
+				$object = new Iframe($title, $content);
54 54
 				break;
55 55
 
56 56
 			default :
57
-				$object = new $class_name( $arguments );
57
+				$object = new $class_name($arguments);
58 58
 
59 59
 		}
60 60
 
Please login to merge, or discard this patch.
core/exceptions/IpnException.php 1 patch
Indentation   +51 added lines, -51 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 namespace EventEspresso\core\exceptions;
3 3
 
4 4
 if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
-    exit('No direct script access allowed');
5
+	exit('No direct script access allowed');
6 6
 }
7 7
 
8 8
 
@@ -21,71 +21,71 @@  discard block
 block discarded – undo
21 21
 class IpnException extends \LogicException
22 22
 {
23 23
 
24
-    const DUPLICATE          = 1;
24
+	const DUPLICATE          = 1;
25 25
 
26
-    const UNABLE_TO_VALIDATE = 2;
26
+	const UNABLE_TO_VALIDATE = 2;
27 27
 
28
-    const UNSUPPORTED        = 3;
28
+	const UNSUPPORTED        = 3;
29 29
 
30
-    /**
31
-     * @var \EE_Payment
32
-     */
33
-    protected $payment;
30
+	/**
31
+	 * @var \EE_Payment
32
+	 */
33
+	protected $payment;
34 34
 
35
-    /**
36
-     * @var mixed IPN data, usually an array or object
37
-     */
38
-    protected $ipn_data;
35
+	/**
36
+	 * @var mixed IPN data, usually an array or object
37
+	 */
38
+	protected $ipn_data;
39 39
 
40 40
 
41 41
 
42
-    public function __construct(
43
-        $message,
44
-        $code = 0,
45
-        \Exception $previous = null,
46
-        \EE_Payment $payment = null,
47
-        $ipn_data = array()
48
-    ) {
49
-        parent::__construct($message, $code, $previous);
50
-        $this->payment = $payment;
51
-        $this->ipn_data = $ipn_data;
52
-    }
42
+	public function __construct(
43
+		$message,
44
+		$code = 0,
45
+		\Exception $previous = null,
46
+		\EE_Payment $payment = null,
47
+		$ipn_data = array()
48
+	) {
49
+		parent::__construct($message, $code, $previous);
50
+		$this->payment = $payment;
51
+		$this->ipn_data = $ipn_data;
52
+	}
53 53
 
54 54
 
55 55
 
56
-    /**
57
-     * Gets the payment associated with this IPN, if known
58
-     *
59
-     * @return \EE_Payment
60
-     */
61
-    public function getPayment()
62
-    {
63
-        return $this->payment;
64
-    }
56
+	/**
57
+	 * Gets the payment associated with this IPN, if known
58
+	 *
59
+	 * @return \EE_Payment
60
+	 */
61
+	public function getPayment()
62
+	{
63
+		return $this->payment;
64
+	}
65 65
 
66 66
 
67 67
 
68
-    /**
69
-     * Returns the payment's properties as an array (even if there is no payment, in which case it's an empty array)
70
-     *
71
-     * @return array
72
-     * @throws \EE_Error
73
-     */
74
-    public function getPaymentProperties()
75
-    {
76
-        return $this->getPayment() instanceof \EE_Payment ? $this->getPayment()->model_field_array() : array();
77
-    }
68
+	/**
69
+	 * Returns the payment's properties as an array (even if there is no payment, in which case it's an empty array)
70
+	 *
71
+	 * @return array
72
+	 * @throws \EE_Error
73
+	 */
74
+	public function getPaymentProperties()
75
+	{
76
+		return $this->getPayment() instanceof \EE_Payment ? $this->getPayment()->model_field_array() : array();
77
+	}
78 78
 
79 79
 
80 80
 
81
-    /**
82
-     * Returns an array, object, or string, however, the IPN data was received
83
-     *
84
-     * @return mixed
85
-     */
86
-    public function getIpnData()
87
-    {
88
-        return $this->ipn_data;
89
-    }
81
+	/**
82
+	 * Returns an array, object, or string, however, the IPN data was received
83
+	 *
84
+	 * @return mixed
85
+	 */
86
+	public function getIpnData()
87
+	{
88
+		return $this->ipn_data;
89
+	}
90 90
 
91 91
 }
92 92
\ No newline at end of file
Please login to merge, or discard this patch.
modules/invalid_checkout_access/EED_Invalid_Checkout_Access.module.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 use EventEspresso\modules\invalid_checkout_access\InvalidCheckoutAccess;
3 3
 
4
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
5
-	exit( 'No direct script access allowed' );
4
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
+	exit('No direct script access allowed');
6 6
 }
7 7
 
8 8
 
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
 	public static function set_hooks_admin() {
37 37
 		add_action(
38 38
 			'AHEE__Extend_Registration_Form_Admin_Page___reg_form_settings_template',
39
-			array( 'EED_Invalid_Checkout_Access', 'display_invalid_checkout_access_form' ),
39
+			array('EED_Invalid_Checkout_Access', 'display_invalid_checkout_access_form'),
40 40
 			15
41 41
 		);
42 42
 		add_filter(
43 43
 			'FHEE__Extend_Registration_Form_Admin_Page___update_reg_form_settings__CFG_registration',
44
-			array( 'EED_Invalid_Checkout_Access', 'process_invalid_checkout_access_form' )
44
+			array('EED_Invalid_Checkout_Access', 'process_invalid_checkout_access_form')
45 45
 		);
46 46
 	}
47 47
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 *
54 54
 	 * @var WP $WP
55 55
 	 */
56
-	public function run( $WP ) {
56
+	public function run($WP) {
57 57
 		// TODO: Implement run() method.
58 58
 	}
59 59
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * @return InvalidCheckoutAccess
64 64
 	 */
65 65
 	public static function getInvalidCheckoutAccess() {
66
-		if ( ! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess ) {
66
+		if ( ! self::$invalid_checkout_access_form instanceof InvalidCheckoutAccess) {
67 67
 			self::$invalid_checkout_access_form = new InvalidCheckoutAccess();
68 68
 		}
69 69
 		return self::$invalid_checkout_access_form;
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 	 * @param \EE_Registration_Config $EE_Registration_Config
91 91
 	 * @return \EE_Registration_Config
92 92
 	 */
93
-	public static function process_invalid_checkout_access_form( \EE_Registration_Config $EE_Registration_Config ) {
93
+	public static function process_invalid_checkout_access_form(\EE_Registration_Config $EE_Registration_Config) {
94 94
 		$invalid_checkout_access_form = \EED_Invalid_Checkout_Access::getInvalidCheckoutAccess();
95
-		return $invalid_checkout_access_form->processForm( $EE_Registration_Config );
95
+		return $invalid_checkout_access_form->processForm($EE_Registration_Config);
96 96
 	}
97 97
 
98 98
 
Please login to merge, or discard this patch.
core/exceptions/InvalidSessionDataException.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\exceptions;
3 3
 
4
-defined( 'ABSPATH' ) || exit;
4
+defined('ABSPATH') || exit;
5 5
 
6 6
 
7 7
 
@@ -22,11 +22,11 @@  discard block
 block discarded – undo
22 22
 	 * @param int        $code
23 23
 	 * @param \Exception $previous
24 24
 	 */
25
-	public function __construct( $message = '', $code = 0, \Exception $previous = null ) {
26
-		if ( empty( $message ) ) {
27
-			$message = esc_html__( 'The session data is either missing or invalid.', 'event_espresso' );
25
+	public function __construct($message = '', $code = 0, \Exception $previous = null) {
26
+		if (empty($message)) {
27
+			$message = esc_html__('The session data is either missing or invalid.', 'event_espresso');
28 28
 		}
29
-		parent::__construct( $message, $code, $previous );
29
+		parent::__construct($message, $code, $previous);
30 30
 	}
31 31
 
32 32
 
Please login to merge, or discard this patch.