Completed
Branch FET-8209-allow-multiple-carts (f5b2f0)
by
unknown
108:40 queued 97:50
created
core/db_classes/EE_CPT_Base.class.php 2 patches
Spacing   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /**
5 5
  * Event Espresso
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 	 * @param int    $parent_term_taxonomy_id optional
48 48
 	 * @return EE_Term_Taxonomy
49 49
 	 */
50
-	function add_event_category( $category_name, $category_description = NULL, $parent_term_taxonomy_id = NULL ) {
51
-		return $this->get_model()->add_event_category( $this, $category_name, $category_description, $parent_term_taxonomy_id );
50
+	function add_event_category($category_name, $category_description = NULL, $parent_term_taxonomy_id = NULL) {
51
+		return $this->get_model()->add_event_category($this, $category_name, $category_description, $parent_term_taxonomy_id);
52 52
 	}
53 53
 
54 54
 
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 	 * @param string $category_name
59 59
 	 * @return bool
60 60
 	 */
61
-	function remove_event_category( $category_name ) {
62
-		return $this->get_model()->remove_event_category( $this, $category_name );
61
+	function remove_event_category($category_name) {
62
+		return $this->get_model()->remove_event_category($this, $category_name);
63 63
 	}
64 64
 
65 65
 
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
 	 * @param EE_Term_Taxonomy $term_taxonomy
71 71
 	 * @return EE_Base_Class the relation was removed from
72 72
 	 */
73
-	function remove_relation_to_term_taxonomy( $term_taxonomy ) {
74
-		if ( !$term_taxonomy ) {
75
-			EE_Error::add_error( sprintf( __( "No Term_Taxonomy provided which to remove from model object of type %s and id %d", "event_espresso" ), get_class( $this ), $this->ID() ), __FILE__, __FUNCTION__, __LINE__ );
73
+	function remove_relation_to_term_taxonomy($term_taxonomy) {
74
+		if ( ! $term_taxonomy) {
75
+			EE_Error::add_error(sprintf(__("No Term_Taxonomy provided which to remove from model object of type %s and id %d", "event_espresso"), get_class($this), $this->ID()), __FILE__, __FUNCTION__, __LINE__);
76 76
 			return NULL;
77 77
 		}
78
-		$term_taxonomy->set_count( $term_taxonomy->count() - 1 );
78
+		$term_taxonomy->set_count($term_taxonomy->count() - 1);
79 79
 		$term_taxonomy->save();
80
-		return $this->_remove_relation_to( $term_taxonomy, 'Term_Taxonomy' );
80
+		return $this->_remove_relation_to($term_taxonomy, 'Term_Taxonomy');
81 81
 	}
82 82
 
83 83
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 * @return int
102 102
 	 */
103 103
 	public function parent() {
104
-		return $this->get( 'parent' );
104
+		return $this->get('parent');
105 105
 	}
106 106
 
107 107
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 * @return string
112 112
 	 */
113 113
 	public function status() {
114
-		return $this->get( 'status' );
114
+		return $this->get('status');
115 115
 	}
116 116
 
117 117
 
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 	/**
120 120
 	 * @param string $status
121 121
 	 */
122
-	public function set_status( $status ) {
123
-		$this->set( 'status', $status );
122
+	public function set_status($status) {
123
+		$this->set('status', $status);
124 124
 	}
125 125
 
126 126
 
@@ -134,12 +134,12 @@  discard block
 block discarded – undo
134 134
 	 * @param string|array $attr Optional. Query string or array of attributes.
135 135
 	 * @return string HTML image element
136 136
 	 */
137
-	protected function _get_feature_image( $size, $attr ) {
137
+	protected function _get_feature_image($size, $attr) {
138 138
 		//first let's see if we already have the _feature_image property set AND if it has a cached element on it FOR the given size
139
-		$attr_key = is_array( $attr ) ? implode( '_', $attr ) : $attr;
140
-		$cache_key = is_array( $size ) ? implode( '_', $size ) . $attr_key : $size . $attr_key;
141
-		$this->_feature_image[ $cache_key ] = isset( $this->_feature_image[ $cache_key ] ) ? $this->_feature_image[ $cache_key ] : $this->get_model()->get_feature_image( $this->ID(), $size, $attr );
142
-		return $this->_feature_image[ $cache_key ];
139
+		$attr_key = is_array($attr) ? implode('_', $attr) : $attr;
140
+		$cache_key = is_array($size) ? implode('_', $size).$attr_key : $size.$attr_key;
141
+		$this->_feature_image[$cache_key] = isset($this->_feature_image[$cache_key]) ? $this->_feature_image[$cache_key] : $this->get_model()->get_feature_image($this->ID(), $size, $attr);
142
+		return $this->_feature_image[$cache_key];
143 143
 	}
144 144
 
145 145
 
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 	 * @param string|array $attr
151 151
 	 * @return string of html
152 152
 	 */
153
-	public function feature_image( $size = 'thumbnail', $attr = '' ) {
154
-		return $this->_get_feature_image( $size, $attr );
153
+	public function feature_image($size = 'thumbnail', $attr = '') {
154
+		return $this->_get_feature_image($size, $attr);
155 155
 	}
156 156
 
157 157
 
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
 	 * @param  string|array $size can either be a string: 'thumbnail', 'medium', 'large', 'full' OR 2-item array representing width and height in pixels eg. array(32,32).
162 162
 	 * @return string|boolean          the url of the image or false if not found
163 163
 	 */
164
-	public function feature_image_url( $size = 'thumbnail' ) {
165
-		$attachment = wp_get_attachment_image_src( get_post_thumbnail_id( $this->ID() ), $size );
166
-		return !empty( $attachment ) ? $attachment[ 0 ] : FALSE;
164
+	public function feature_image_url($size = 'thumbnail') {
165
+		$attachment = wp_get_attachment_image_src(get_post_thumbnail_id($this->ID()), $size);
166
+		return ! empty($attachment) ? $attachment[0] : FALSE;
167 167
 	}
168 168
 
169 169
 
@@ -185,36 +185,36 @@  discard block
 block discarded – undo
185 185
 	 *                                 This array is INDEXED by RELATED OBJ NAME (so it corresponds with the obj_names sent);
186 186
 	 * @return void
187 187
 	 */
188
-	public function restore_revision( $revision_id, $related_obj_names = array(), $where_query = array() ) {
188
+	public function restore_revision($revision_id, $related_obj_names = array(), $where_query = array()) {
189 189
 		//get revision object
190
-		$revision_obj = $this->get_model()->get_one_by_ID( $revision_id );
191
-		if ( $revision_obj instanceof EE_CPT_Base ) {
190
+		$revision_obj = $this->get_model()->get_one_by_ID($revision_id);
191
+		if ($revision_obj instanceof EE_CPT_Base) {
192 192
 			//no related_obj_name so we assume we're saving a revision on this object.
193
-			if ( empty( $related_obj_names ) ) {
193
+			if (empty($related_obj_names)) {
194 194
 				$fields = $this->get_model()->get_meta_table_fields();
195
-				foreach ( $fields as $field ) {
196
-					$this->set( $field, $revision_obj->get( $field ) );
195
+				foreach ($fields as $field) {
196
+					$this->set($field, $revision_obj->get($field));
197 197
 				}
198 198
 				$this->save();
199 199
 			}
200
-			$related_obj_names = (array)$related_obj_names;
201
-			foreach ( $related_obj_names as $related_name ) {
200
+			$related_obj_names = (array) $related_obj_names;
201
+			foreach ($related_obj_names as $related_name) {
202 202
 				//related_obj_name so we're saving a revision on an object related to this object
203 203
 				//do we have $where_query params for this related object?  If we do then we include that.
204
-				$cols_n_values = isset( $where_query[ $related_name ] ) ? $where_query[ $related_name ] : array();
205
-				$where_params = !empty( $cols_n_values ) ? array( $cols_n_values ) : array();
206
-				$related_objs = $this->get_many_related( $related_name, $where_params );
207
-				$revision_related_objs = $revision_obj->get_many_related( $related_name, $where_params );
204
+				$cols_n_values = isset($where_query[$related_name]) ? $where_query[$related_name] : array();
205
+				$where_params = ! empty($cols_n_values) ? array($cols_n_values) : array();
206
+				$related_objs = $this->get_many_related($related_name, $where_params);
207
+				$revision_related_objs = $revision_obj->get_many_related($related_name, $where_params);
208 208
 				//load helper
209 209
 				//remove related objs from this object that are not in revision
210 210
 				//array_diff *should* work cause I think objects are indexed by ID?
211
-				$related_to_remove = EEH_Array::object_array_diff( $related_objs, $revision_related_objs );
212
-				foreach ( $related_to_remove as $rr ) {
213
-					$this->_remove_relation_to( $rr, $related_name, $cols_n_values );
211
+				$related_to_remove = EEH_Array::object_array_diff($related_objs, $revision_related_objs);
212
+				foreach ($related_to_remove as $rr) {
213
+					$this->_remove_relation_to($rr, $related_name, $cols_n_values);
214 214
 				}
215 215
 				//add all related objs attached to revision to this object
216
-				foreach ( $revision_related_objs as $r_obj ) {
217
-					$this->_add_relation_to( $r_obj, $related_name, $cols_n_values );
216
+				foreach ($revision_related_objs as $r_obj) {
217
+					$this->_add_relation_to($r_obj, $related_name, $cols_n_values);
218 218
 				}
219 219
 			}
220 220
 		}
@@ -230,8 +230,8 @@  discard block
 block discarded – undo
230 230
 	 * <li>If $single is set to false, or left blank, the function returns an array containing all values of the specified key.</li>
231 231
 	 * <li>If $single is set to true, the function returns the first value of the specified key (not in an array</li></ul>
232 232
 	 */
233
-	public function get_post_meta( $meta_key = NULL, $single = FALSE ) {
234
-		return get_post_meta( $this->ID(), $meta_key, $single );
233
+	public function get_post_meta($meta_key = NULL, $single = FALSE) {
234
+		return get_post_meta($this->ID(), $meta_key, $single);
235 235
 	}
236 236
 
237 237
 
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
 	 * @param mixed  $prev_value
244 244
 	 * @return mixed Returns meta_id if the meta doesn't exist, otherwise returns true on success and false on failure. NOTE: If the meta_value passed to this function is the same as the value that is already in the database, this function returns false.
245 245
 	 */
246
-	public function update_post_meta( $meta_key, $meta_value, $prev_value = NULL ) {
247
-		if ( ! $this->ID() ) {
246
+	public function update_post_meta($meta_key, $meta_value, $prev_value = NULL) {
247
+		if ( ! $this->ID()) {
248 248
 			$this->save();
249 249
 		}
250
-		return update_post_meta( $this->ID(), $meta_key, $meta_value, $prev_value );
250
+		return update_post_meta($this->ID(), $meta_key, $meta_value, $prev_value);
251 251
 	}
252 252
 
253 253
 
@@ -259,11 +259,11 @@  discard block
 block discarded – undo
259 259
 	 * @param bool  $unique . If postmeta for this $meta_key already exists, whether to add an additional item or not
260 260
 	 * @return boolean Boolean true, except if the $unique argument was set to true and a custom field with the given key already exists, in which case false is returned.
261 261
 	 */
262
-	public function add_post_meta( $meta_key, $meta_value, $unique = FALSE ) {
263
-		if ( $this->ID() ) {
262
+	public function add_post_meta($meta_key, $meta_value, $unique = FALSE) {
263
+		if ($this->ID()) {
264 264
 			$this->save();
265 265
 		}
266
-		return add_post_meta( $this->ID(), $meta_key, $meta_value, $unique );
266
+		return add_post_meta($this->ID(), $meta_key, $meta_value, $unique);
267 267
 	}
268 268
 
269 269
 
@@ -275,13 +275,13 @@  discard block
 block discarded – undo
275 275
 	 * @param mixed $meta_value
276 276
 	 * @return boolean False for failure. True for success.
277 277
 	 */
278
-	public function delete_post_meta( $meta_key, $meta_value = '' ) {
279
-		if ( ! $this->ID() ) {
278
+	public function delete_post_meta($meta_key, $meta_value = '') {
279
+		if ( ! $this->ID()) {
280 280
 			//there are obviously no postmetas for this if it's not saved
281 281
 			//so let's just report this as a success
282 282
 			return true;
283 283
 		}
284
-		return delete_post_meta( $this->ID(), $meta_key, $meta_value );
284
+		return delete_post_meta($this->ID(), $meta_key, $meta_value);
285 285
 	}
286 286
 
287 287
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 	 * @return string
292 292
 	 */
293 293
 	public function get_permalink() {
294
-		return get_permalink( $this->ID() );
294
+		return get_permalink($this->ID());
295 295
 	}
296 296
 
297 297
 
@@ -301,8 +301,8 @@  discard block
 block discarded – undo
301 301
 	 * @param array $query_params
302 302
 	 * @return EE_Term_Taxonomy
303 303
 	 */
304
-	public function term_taxonomies( $query_params = array() ) {
305
-		return $this->get_many_related( 'Term_Taxonomy', $query_params );
304
+	public function term_taxonomies($query_params = array()) {
305
+		return $this->get_many_related('Term_Taxonomy', $query_params);
306 306
 	}
307 307
 
308 308
 
Please login to merge, or discard this patch.
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 *
131 131
 	 * @link   http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail
132 132
 	 * @access protected
133
-	 * @param string|array $size (optional) Image size. Defaults to 'post-thumbnail' but can also be a 2-item array representing width and height in pixels (i.e. array(32,32) ).
133
+	 * @param string $size (optional) Image size. Defaults to 'post-thumbnail' but can also be a 2-item array representing width and height in pixels (i.e. array(32,32) ).
134 134
 	 * @param string|array $attr Optional. Query string or array of attributes.
135 135
 	 * @return string HTML image element
136 136
 	 */
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	 * This is a method for restoring this_obj using details from the given $revision_id
173 173
 	 *
174 174
 	 * @param int $revision_id 		ID of the revision we're getting data from
175
-	 * @param array $related_obj_names if included this will be used to restore for related obj
175
+	 * @param string[] $related_obj_names if included this will be used to restore for related obj
176 176
 	 *                                 if not included then we just do restore on the meta.
177 177
 	 *                                 We will accept an array of related_obj_names for restoration here.
178 178
 	 * @param array $where_query       You can optionally include an array of key=>value pairs
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 	 * Wrapper for get_post_meta, http://codex.wordpress.org/Function_Reference/get_post_meta
227 227
 	 * @param string  $meta_key
228 228
 	 * @param boolean $single
229
-	 * @return mixed <ul><li>If only $id is set it will return all meta values in an associative array.</li>
229
+	 * @return string|null <ul><li>If only $id is set it will return all meta values in an associative array.</li>
230 230
 	 * <li>If $single is set to false, or left blank, the function returns an array containing all values of the specified key.</li>
231 231
 	 * <li>If $single is set to true, the function returns the first value of the specified key (not in an array</li></ul>
232 232
 	 */
@@ -254,8 +254,8 @@  discard block
 block discarded – undo
254 254
 
255 255
 	/**
256 256
 	 * Wrapper for add_post_meta, http://codex.wordpress.org/Function_Reference/add_post_meta
257
-	 * @param mixed $meta_key
258
-	 * @param mixed $meta_value
257
+	 * @param string $meta_key
258
+	 * @param string $meta_value
259 259
 	 * @param bool  $unique . If postmeta for this $meta_key already exists, whether to add an additional item or not
260 260
 	 * @return boolean Boolean true, except if the $unique argument was set to true and a custom field with the given key already exists, in which case false is returned.
261 261
 	 */
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 	/**
272 272
 	 * Wrapper for delete_post_meta, http://codex.wordpress.org/Function_Reference/delete_post_meta
273 273
 	 *
274
-	 * @param mixed $meta_key
274
+	 * @param string $meta_key
275 275
 	 * @param mixed $meta_value
276 276
 	 * @return boolean False for failure. True for success.
277 277
 	 */
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 	/**
300 300
 	 * Gets all the term-taxonomies for this CPT
301 301
 	 * @param array $query_params
302
-	 * @return EE_Term_Taxonomy
302
+	 * @return EE_Base_Class[]
303 303
 	 */
304 304
 	public function term_taxonomies( $query_params = array() ) {
305 305
 		return $this->get_many_related( 'Term_Taxonomy', $query_params );
Please login to merge, or discard this patch.
core/CPTs/EE_CPT_Venue_Strategy.core.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,15 +39,15 @@  discard block
 block discarded – undo
39 39
 	 * @param 	array 	$arguments
40 40
 	 * @return \EE_CPT_Venue_Strategy
41 41
 	 */
42
-	public function __construct( $arguments = array() ) {
43
-		$this->CPT = isset( $arguments['CPT'] ) ? $arguments['CPT'] : NULL;
44
-		$WP_Query = isset( $arguments['WP_Query'] ) ? $arguments['WP_Query'] : NULL;
45
-		if ( $WP_Query instanceof WP_Query && ! $WP_Query->is_tag ) {
46
-			$WP_Query->is_espresso_venue_single = is_singular() && isset( $WP_Query->query->post_type ) && $WP_Query->query->post_type == 'espresso_venues' ? TRUE : FALSE;
42
+	public function __construct($arguments = array()) {
43
+		$this->CPT = isset($arguments['CPT']) ? $arguments['CPT'] : NULL;
44
+		$WP_Query = isset($arguments['WP_Query']) ? $arguments['WP_Query'] : NULL;
45
+		if ($WP_Query instanceof WP_Query && ! $WP_Query->is_tag) {
46
+			$WP_Query->is_espresso_venue_single = is_singular() && isset($WP_Query->query->post_type) && $WP_Query->query->post_type == 'espresso_venues' ? TRUE : FALSE;
47 47
 			$WP_Query->is_espresso_venue_archive = is_post_type_archive('espresso_venues') ? TRUE : FALSE;
48
-			$WP_Query->is_espresso_venue_taxonomy = is_tax( 'espresso_venue_categories' ) ? TRUE : FALSE;
48
+			$WP_Query->is_espresso_venue_taxonomy = is_tax('espresso_venue_categories') ? TRUE : FALSE;
49 49
 		}
50
-		add_filter( 'the_posts', array( $this, 'the_posts' ), 1, 2 );
50
+		add_filter('the_posts', array($this, 'the_posts'), 1, 2);
51 51
 	}
52 52
 
53 53
 
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
 	 * @param WP_Query $wp_query
61 61
 	 * @return    void
62 62
 	 */
63
-	public function the_posts( $posts, WP_Query $wp_query) {
63
+	public function the_posts($posts, WP_Query $wp_query) {
64 64
 		// automagically load the EEH_Venue_View helper so that it's functions are available
65
-		if ( isset( EE_Registry::instance()->CFG->map_settings->use_google_maps ) && EE_Registry::instance()->CFG->map_settings->use_google_maps ) {
65
+		if (isset(EE_Registry::instance()->CFG->map_settings->use_google_maps) && EE_Registry::instance()->CFG->map_settings->use_google_maps) {
66 66
 			EEH_Maps::espresso_google_map_js();
67 67
 		}
68
-		remove_filter( 'the_posts', array( $this, 'the_posts' ), 1, 2 );
68
+		remove_filter('the_posts', array($this, 'the_posts'), 1, 2);
69 69
 		return $posts;
70 70
 	}
71 71
 
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.
core/services/address/formatters/NullAddressFormatter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\services\address\formatters;
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
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string $CNT_ISO
29 29
 	 * @return string
30 30
 	 */
31
-	public function format( $address, $address2, $city, $state, $zip, $country, $CNT_ISO ) {
31
+	public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO) {
32 32
 		return null;
33 33
 	}
34 34
 
Please login to merge, or discard this patch.
core/services/address/formatters/AddressFormatter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\services\address\formatters;
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
 
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
 		// swap address part placeholders for the real text
42 42
 		$formatted_address = str_replace(
43 43
 		// find
44
-			array( '{address}', '{address2}', '{city}', '{state}', '{zip}', '{country}' ),
44
+			array('{address}', '{address2}', '{city}', '{state}', '{zip}', '{country}'),
45 45
 			// replace
46
-			array( $address, $address2, $city, $state, $zip, $country ),
46
+			array($address, $address2, $city, $state, $zip, $country),
47 47
 			// string
48 48
 			$formatted_address
49 49
 		);
50 50
 		// remove placeholder from start and end, reduce repeating placeholders to singles, then replace with HTML line breaks
51
-		return preg_replace( '/%+/', $sub, trim( $formatted_address, '%' ) );
51
+		return preg_replace('/%+/', $sub, trim($formatted_address, '%'));
52 52
 	}
53 53
 
54 54
 
Please login to merge, or discard this patch.
core/services/address/formatters/MultiLineAddressFormatter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\services\address\formatters;
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
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @param string $CNT_ISO
30 30
 	 * @return string
31 31
 	 */
32
-	public function format( $address, $address2, $city, $state, $zip, $country, $CNT_ISO ) {
32
+	public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO) {
33 33
 		$address_formats = apply_filters(
34 34
 			'FHEE__EE_MultiLine_Address_Formatter__address_formats',
35 35
 			array(
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 			)
41 41
 		);
42 42
 		// if the incoming country has a set format, use that, else use the default
43
-		$formatted_address = isset( $address_formats[ $CNT_ISO ] ) ? $address_formats[ $CNT_ISO ]
43
+		$formatted_address = isset($address_formats[$CNT_ISO]) ? $address_formats[$CNT_ISO]
44 44
 			: $address_formats['ZZ'];
45 45
 		return $this->parse_formatted_address(
46 46
 			$address,
Please login to merge, or discard this patch.
core/services/address/formatters/InlineAddressFormatter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\services\address\formatters;
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
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 * @param string $CNT_ISO
29 29
 	 * @return string
30 30
 	 */
31
-	public function format( $address, $address2, $city, $state, $zip, $country, $CNT_ISO ) {
31
+	public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO) {
32 32
 		$address_formats = apply_filters(
33 33
 			'FHEE__EE_Inline_Address_Formatter__address_formats',
34 34
 			array(
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 			)
40 40
 		);
41 41
 		// if the incoming country has a set format, use that, else use the default
42
-		$formatted_address = isset( $address_formats[ $CNT_ISO ] ) ? $address_formats[ $CNT_ISO ]
42
+		$formatted_address = isset($address_formats[$CNT_ISO]) ? $address_formats[$CNT_ISO]
43 43
 			: $address_formats['ZZZ'];
44 44
 		return $this->parse_formatted_address(
45 45
 			$address,
Please login to merge, or discard this patch.
core/business/EE_Processor_Base.class.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
 	/**
33 33
 	 * @param boolean $IPN
34 34
 	 */
35
-	public static function set_IPN( $IPN ) {
36
-		self::$IPN = filter_var( $IPN, FILTER_VALIDATE_BOOLEAN );
35
+	public static function set_IPN($IPN) {
36
+		self::$IPN = filter_var($IPN, FILTER_VALIDATE_BOOLEAN);
37 37
 	}
38 38
 
39 39
 
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 	 * @param bool $revisit
45 45
 	 * @return void
46 46
 	 */
47
-	public function set_revisit( $revisit = false ) {
48
-		$this->_revisit = filter_var( $revisit, FILTER_VALIDATE_BOOLEAN );
47
+	public function set_revisit($revisit = false) {
48
+		$this->_revisit = filter_var($revisit, FILTER_VALIDATE_BOOLEAN);
49 49
 	}
50 50
 
51 51
 
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
 	 * @param array $info
61 61
 	 * @param bool $display_request
62 62
 	 */
63
-	protected function log( $class = '', $func = '', $line = '', EE_Transaction $transaction, $info = array(), $display_request = false ) {
64
-		if ( WP_DEBUG && false ) {
65
-			if ( $transaction instanceof EE_Transaction ) {
63
+	protected function log($class = '', $func = '', $line = '', EE_Transaction $transaction, $info = array(), $display_request = false) {
64
+		if (WP_DEBUG && false) {
65
+			if ($transaction instanceof EE_Transaction) {
66 66
 				// don't serialize objects
67
-				$info = EEH_Debug_Tools::strip_objects( $info );
68
-				if ( $transaction->ID() ) {
69
-					$info[ 'TXN_status' ] = $transaction->status_ID();
70
-					$info[ 'TXN_reg_steps' ] = $transaction->reg_steps();
71
-					$index = 'EE_Transaction: ' . $transaction->ID();
72
-					EEH_Debug_Tools::log( $class, $func, $line, $info, $display_request, $index );
67
+				$info = EEH_Debug_Tools::strip_objects($info);
68
+				if ($transaction->ID()) {
69
+					$info['TXN_status'] = $transaction->status_ID();
70
+					$info['TXN_reg_steps'] = $transaction->reg_steps();
71
+					$index = 'EE_Transaction: '.$transaction->ID();
72
+					EEH_Debug_Tools::log($class, $func, $line, $info, $display_request, $index);
73 73
 				}
74 74
 			}
75 75
 		}
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Credit_Card_Month_Input.input.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION'))
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('No direct script access allowed');
4 4
 
5 5
 /**
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  *
25 25
  * ------------------------------------------------------------------------
26 26
  */
27
-class EE_Credit_Card_Month_Input extends EE_Month_Input{
27
+class EE_Credit_Card_Month_Input extends EE_Month_Input {
28 28
 
29 29
 	/**
30 30
 	 * @param bool  $leading_zero
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
 		$leading_zero = false, 
36 36
 		$input_settings = array(), 
37 37
 		$january_is_month_1 = true 
38
-	){
39
-		$this->set_sensitive_data_removal_strategy( new EE_All_Sensitive_Data_Removal() );
38
+	) {
39
+		$this->set_sensitive_data_removal_strategy(new EE_All_Sensitive_Data_Removal());
40 40
 		parent::__construct(
41 41
 			$leading_zero,
42 42
 			$input_settings, 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if (!defined('EVENT_ESPRESSO_VERSION')) {
4 4
 	exit('No direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Month_Input.input.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,21 +6,21 @@  discard block
 block discarded – undo
6 6
  * @subpackage
7 7
  * @author				Mike Nelson
8 8
  */
9
-class EE_Month_Input extends EE_Select_Input{
9
+class EE_Month_Input extends EE_Select_Input {
10 10
 
11 11
 	/**
12 12
 	 * @param bool  $leading_zero
13 13
 	 * @param array $input_settings
14 14
 	 * @param bool $january_is_month_1 whether january should have value of 1; or it should be month 0
15 15
 	 */
16
-	function __construct( $leading_zero = false, $input_settings = array(), $january_is_month_1 = true){
16
+	function __construct($leading_zero = false, $input_settings = array(), $january_is_month_1 = true) {
17 17
 		$key_begin_range = $january_is_month_1 ? 1 : 0;
18
-		$key_range = range($key_begin_range, $key_begin_range + 11 );
19
-		if($leading_zero){
20
-			array_walk( $key_range, array( $this, '_zero_pad' ) );	
18
+		$key_range = range($key_begin_range, $key_begin_range + 11);
19
+		if ($leading_zero) {
20
+			array_walk($key_range, array($this, '_zero_pad'));	
21 21
 		}
22
-		$value_range = range( 1, 12 );
23
-		array_walk( $value_range, array( $this, '_zero_pad' ) );
22
+		$value_range = range(1, 12);
23
+		array_walk($value_range, array($this, '_zero_pad'));
24 24
 		parent::__construct(
25 25
 			array_combine( 
26 26
 				$key_range, 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	 * @param int $input
36 36
 	 * @param mixed $key
37 37
 	 */
38
-	protected function _zero_pad( &$input, $key ) {
39
-		$input = str_pad( $input, 2, '0', STR_PAD_LEFT );
38
+	protected function _zero_pad(&$input, $key) {
39
+		$input = str_pad($input, 2, '0', STR_PAD_LEFT);
40 40
 	}
41 41
 }
42 42
\ No newline at end of file
Please login to merge, or discard this patch.