Completed
Branch BUG-9019-ticket-selector-submi... (c1f9d8)
by
unknown
435:14 queued 416:01
created
core/db_models/EEM_Venue.model.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * ------------------------------------------------------------------------
23 23
  */
24
-require_once ( EE_MODELS . 'EEM_Base.model.php' );
24
+require_once (EE_MODELS.'EEM_Base.model.php');
25 25
 
26 26
 class EEM_Venue extends EEM_CPT_Base {
27 27
 
28 28
   	// private instance of the Attendee object
29 29
 	protected static $_instance = NULL;
30 30
 
31
-	protected function __construct( $timezone = NULL ) {
32
-		$this->singular_item = __('Venue','event_espresso');
33
-		$this->plural_item = __('Venues','event_espresso');
31
+	protected function __construct($timezone = NULL) {
32
+		$this->singular_item = __('Venue', 'event_espresso');
33
+		$this->plural_item = __('Venues', 'event_espresso');
34 34
 		$this->_tables = array(
35 35
 			'Venue_CPT'=> new EE_Primary_Table('posts', 'ID'),
36 36
 			'Venue_Meta'=>new EE_Secondary_Table('esp_venue_meta', 'VNUM_ID', 'VNU_ID')
@@ -39,32 +39,32 @@  discard block
 block discarded – undo
39 39
 			'Venue_CPT'=>array(
40 40
 				'VNU_ID'=>new EE_Primary_Key_Int_Field('ID', __("Venue ID", "event_espresso")),
41 41
 				'VNU_name'=>new EE_Plain_Text_Field('post_title', __("Venue Name", "event_espresso"), false, ''),
42
-				'VNU_desc'=>new EE_Post_Content_Field('post_content', __("Venue Description", "event_espresso"), false,''),
43
-				'VNU_identifier'=>new EE_Slug_Field('post_name', __("Venue Identifier", "event_espresso"), false,''),
44
-				'VNU_created'=>new EE_Datetime_Field('post_date', __("Date Venue Created", "event_espresso"), FALSE,time()),
45
-				'VNU_short_desc'=>new EE_Plain_Text_Field('post_excerpt', __("Short Description of Venue", "event_espresso"), true,''),
46
-				'VNU_modified'=>new EE_Datetime_Field('post_modified', __("Venue Modified Date", "event_espresso"), FALSE,time()),
47
-				'VNU_wp_user'=>new EE_WP_User_Field('post_author', __("Venue Creator ID", "event_espresso"), false ),
48
-				'parent'=>new EE_Integer_Field('post_parent', __("Venue Parent ID", "event_espresso"), false,0),
42
+				'VNU_desc'=>new EE_Post_Content_Field('post_content', __("Venue Description", "event_espresso"), false, ''),
43
+				'VNU_identifier'=>new EE_Slug_Field('post_name', __("Venue Identifier", "event_espresso"), false, ''),
44
+				'VNU_created'=>new EE_Datetime_Field('post_date', __("Date Venue Created", "event_espresso"), FALSE, time()),
45
+				'VNU_short_desc'=>new EE_Plain_Text_Field('post_excerpt', __("Short Description of Venue", "event_espresso"), true, ''),
46
+				'VNU_modified'=>new EE_Datetime_Field('post_modified', __("Venue Modified Date", "event_espresso"), FALSE, time()),
47
+				'VNU_wp_user'=>new EE_WP_User_Field('post_author', __("Venue Creator ID", "event_espresso"), false),
48
+				'parent'=>new EE_Integer_Field('post_parent', __("Venue Parent ID", "event_espresso"), false, 0),
49 49
 				'VNU_order'=>new EE_Integer_Field('menu_order', __("Venue order", "event_espresso"), false, 1),
50
-				'post_type'=>new EE_WP_Post_Type_Field('espresso_venues'),// EE_Plain_Text_Field('post_type', __("Venue post type", "event_espresso"), false, 'espresso_venues'),
50
+				'post_type'=>new EE_WP_Post_Type_Field('espresso_venues'), // EE_Plain_Text_Field('post_type', __("Venue post type", "event_espresso"), false, 'espresso_venues'),
51 51
 				),
52 52
 			'Venue_Meta'=>array(
53 53
 				'VNUM_ID'=>new EE_DB_Only_Int_Field('VNUM_ID', __("ID of Venue Meta Row", "event_espresso"), false),
54 54
 				'VNU_ID_fk'=>new EE_DB_Only_Int_Field('VNU_ID', __("Foreign Key to Venue Post ", "event_espresso"), false),
55 55
 				'VNU_address'=>new EE_Plain_Text_Field('VNU_address', __("Venue Address line 1", "event_espresso"), true, ''),
56
-				'VNU_address2'=>new EE_Plain_Text_Field('VNU_address2', __("Venue Address line 2", "event_espresso"), true,''),
56
+				'VNU_address2'=>new EE_Plain_Text_Field('VNU_address2', __("Venue Address line 2", "event_espresso"), true, ''),
57 57
 				'VNU_city'=>new EE_Plain_Text_Field('VNU_city', __("Venue City", "event_espresso"), true, ''),
58 58
 				'STA_ID'=>new EE_Foreign_Key_Int_Field('STA_ID', __("State ID", "event_espresso"), true, null, 'State'),
59 59
 				'CNT_ISO'=>new EE_Foreign_Key_String_Field('CNT_ISO', __("Country Code", "event_espresso"), true, null, 'Country'),
60 60
 				'VNU_zip'=>new EE_Plain_Text_Field('VNU_zip', __("Venue Zip/Postal Code", "event_espresso"), true),
61 61
 				'VNU_phone'=>new EE_Plain_Text_Field('VNU_phone', __("Venue Phone", "event_espresso"), true),
62
-				'VNU_capacity'=>new EE_Infinite_Integer_Field('VNU_capacity', __("Venue Capacity", "event_espresso"), true,EE_INF),
62
+				'VNU_capacity'=>new EE_Infinite_Integer_Field('VNU_capacity', __("Venue Capacity", "event_espresso"), true, EE_INF),
63 63
 				'VNU_url'=>new EE_Plain_Text_Field('VNU_url', __('Venue Website', 'event_espresso'), true),
64 64
 				'VNU_virtual_phone'=>new EE_Plain_Text_Field('VNU_virtual_phone', __('Call in Number', 'event_espresso'), true),
65
-				'VNU_virtual_url'=>new EE_Plain_Text_Field('VNU_virtual_url', __('Virtual URL', 'event_espresso'), true ),
66
-				'VNU_google_map_link'=>new EE_Plain_Text_Field('VNU_google_map_link', __('Google Map Link', 'event_espresso'), true ),
67
-				'VNU_enable_for_gmap'=>new EE_Boolean_Field('VNU_enable_for_gmap', __('Show Google Map?', 'event_espresso'), false, false )
65
+				'VNU_virtual_url'=>new EE_Plain_Text_Field('VNU_virtual_url', __('Virtual URL', 'event_espresso'), true),
66
+				'VNU_google_map_link'=>new EE_Plain_Text_Field('VNU_google_map_link', __('Google Map Link', 'event_espresso'), true),
67
+				'VNU_enable_for_gmap'=>new EE_Boolean_Field('VNU_enable_for_gmap', __('Show Google Map?', 'event_espresso'), false, false)
68 68
 
69 69
 			));
70 70
 		$this->_model_relations = array(
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 		);
77 77
 		$this->_default_where_conditions_strategy = new EE_CPT_Where_Conditions('espresso_venues', 'VNUM_ID');
78 78
 		//this model is generally available for reading
79
-		$this->_cap_restriction_generators[ EEM_Base::caps_read ] = new EE_Restriction_Generator_Public();
80
-		parent::__construct( $timezone );
79
+		$this->_cap_restriction_generators[EEM_Base::caps_read] = new EE_Restriction_Generator_Public();
80
+		parent::__construct($timezone);
81 81
 	}
82 82
 
83 83
 }
Please login to merge, or discard this patch.
core/db_models/fields/EE_Infinite_Integer_Field.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,32 +7,32 @@  discard block
 block discarded – undo
7 7
  * other than explicitly setting it to EE_INF.
8 8
  * Makes use of constant EE_INF_IN_DB set in espresso.php, and EE_INF, which is a PHP constant definedin the ether
9 9
  */
10
-class EE_Infinite_Integer_Field extends EE_Model_Field_Base{
11
-	function get_wpdb_data_type(){
10
+class EE_Infinite_Integer_Field extends EE_Model_Field_Base {
11
+	function get_wpdb_data_type() {
12 12
 		return '%d';
13 13
 	}
14 14
 	function prepare_for_use_in_db($value_of_field_on_model_object) {
15
-		if($value_of_field_on_model_object === EE_INF){
15
+		if ($value_of_field_on_model_object === EE_INF) {
16 16
 			return EE_INF_IN_DB;
17
-		}else{
17
+		} else {
18 18
 			return intval($value_of_field_on_model_object);
19 19
 		}
20 20
 	}
21 21
 	function prepare_for_set($value_inputted_for_field_on_model_object) {
22
-		if($value_inputted_for_field_on_model_object === EE_INF_IN_DB ||
22
+		if ($value_inputted_for_field_on_model_object === EE_INF_IN_DB ||
23 23
 				$value_inputted_for_field_on_model_object === EE_INF ||
24 24
 				$value_inputted_for_field_on_model_object === "EE_INF"
25
-				){
25
+				) {
26 26
 			return EE_INF;
27
-		}else{
27
+		} else {
28 28
 			return intval($value_inputted_for_field_on_model_object);
29 29
 		}
30 30
 	}
31 31
 	function prepare_for_set_from_db($value_inputted_for_field_on_model_object) {
32 32
 		$intval = intval($value_inputted_for_field_on_model_object);
33
-		if($intval == EE_INF_IN_DB){
33
+		if ($intval == EE_INF_IN_DB) {
34 34
 			return EE_INF;
35
-		}else{
35
+		} else {
36 36
 			return $intval;
37 37
 		}
38 38
 	}
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 	 * @param string $schema input, symbol, text; or any string you want to show if the value equals EE_INF
46 46
 	 * @return string
47 47
 	 */
48
-	function prepare_for_pretty_echoing( $value_on_field_to_be_outputted, $schema = null ) {
49
-		if( $value_on_field_to_be_outputted === EE_INF ){
50
-			switch($schema){
48
+	function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null) {
49
+		if ($value_on_field_to_be_outputted === EE_INF) {
50
+			switch ($schema) {
51 51
 				case 'input':
52 52
 					return '';
53 53
 				case 'symbol':
Please login to merge, or discard this patch.
core/helpers/EEH_Autoloader.helper.php 1 patch
Spacing   +42 added lines, -42 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
 /**
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 	 * @return \EEH_Autoloader
41 41
 	 */
42 42
 	private function __construct() {
43
-		if ( self::$_autoloaders === null ) {
43
+		if (self::$_autoloaders === null) {
44 44
 			self::$_autoloaders = array();
45 45
 			$this->_register_custom_autoloaders();
46
-			spl_autoload_register( array( $this, 'espresso_autoloader' ) );
46
+			spl_autoload_register(array($this, 'espresso_autoloader'));
47 47
 		}
48 48
 	}
49 49
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public static function instance() {
57 57
 		// check if class object is instantiated
58
-		if ( ! self::$_instance instanceof EEH_Autoloader ) {
58
+		if ( ! self::$_instance instanceof EEH_Autoloader) {
59 59
 			self::$_instance = new self();
60 60
 		}
61 61
 		return self::$_instance;
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 	 * @internal  param string $class_name - simple class name ie: session
73 73
 	 * @return 	void
74 74
 	 */
75
-	public static function espresso_autoloader( $class_name ) {
76
-		if ( isset( self::$_autoloaders[ $class_name ] ) ) {
77
-			require_once( self::$_autoloaders[ $class_name ] );
75
+	public static function espresso_autoloader($class_name) {
76
+		if (isset(self::$_autoloaders[$class_name])) {
77
+			require_once(self::$_autoloaders[$class_name]);
78 78
 		}
79 79
 	}
80 80
 
@@ -90,26 +90,26 @@  discard block
 block discarded – undo
90 90
 	 * @return void
91 91
 	 * @throws \EE_Error
92 92
 	 */
93
-	public static function register_autoloader( $class_paths, $read_check = true, $debug = false ) {
94
-		$class_paths = is_array( $class_paths ) ? $class_paths : array( $class_paths );
95
-		foreach ( $class_paths as $class => $path ) {
93
+	public static function register_autoloader($class_paths, $read_check = true, $debug = false) {
94
+		$class_paths = is_array($class_paths) ? $class_paths : array($class_paths);
95
+		foreach ($class_paths as $class => $path) {
96 96
 			// don't give up! you gotta...
97 97
 			// get some class
98
-			if ( empty( $class )) {
99
-				throw new EE_Error ( sprintf( __( 'No Class name was specified while registering an autoloader for the following path: %s.','event_espresso' ), $path ));
98
+			if (empty($class)) {
99
+				throw new EE_Error(sprintf(__('No Class name was specified while registering an autoloader for the following path: %s.', 'event_espresso'), $path));
100 100
 			}
101 101
 			// one day you will find the path young grasshopper
102
-			if ( empty( $path )) {
103
-				throw new EE_Error ( sprintf( __( 'No path was specified while registering an autoloader for the %s class.','event_espresso' ), $class ));
102
+			if (empty($path)) {
103
+				throw new EE_Error(sprintf(__('No path was specified while registering an autoloader for the %s class.', 'event_espresso'), $class));
104 104
 			}
105 105
 			// is file readable ?
106
-			if ( $read_check && ! is_readable( $path )) {
107
-				throw new EE_Error ( sprintf( __( 'The file for the %s class could not be found or is not readable due to file permissions. Please ensure the following path is correct: %s','event_espresso' ), $class, $path ));
106
+			if ($read_check && ! is_readable($path)) {
107
+				throw new EE_Error(sprintf(__('The file for the %s class could not be found or is not readable due to file permissions. Please ensure the following path is correct: %s', 'event_espresso'), $class, $path));
108 108
 			}
109
-			if ( ! isset( self::$_autoloaders[ $class ] )) {
110
-				self::$_autoloaders[ $class ] = str_replace( array( '/', '\\' ), DS, $path );
111
-				if ( WP_DEBUG && $debug ) {
112
-					EEH_Debug_Tools::printr( self::$_autoloaders[ $class ], $class, __FILE__, __LINE__ );
109
+			if ( ! isset(self::$_autoloaders[$class])) {
110
+				self::$_autoloaders[$class] = str_replace(array('/', '\\'), DS, $path);
111
+				if (WP_DEBUG && $debug) {
112
+					EEH_Debug_Tools::printr(self::$_autoloaders[$class], $class, __FILE__, __LINE__);
113 113
 				}
114 114
 			}
115 115
 		}
@@ -138,12 +138,12 @@  discard block
 block discarded – undo
138 138
 	 * 	@return void
139 139
 	 */
140 140
 	private function _register_custom_autoloaders() {
141
-		EEH_Autoloader::register_autoloaders_for_each_file_in_folder( EE_CORE . 'interfaces' );
142
-		EEH_Autoloader::register_autoloaders_for_each_file_in_folder( EE_CORE );
143
-		EEH_Autoloader::register_autoloaders_for_each_file_in_folder( EE_INTERFACES, true );
144
-		EEH_Autoloader::register_autoloaders_for_each_file_in_folder( EE_MODELS, true );
145
-		EEH_Autoloader::register_autoloaders_for_each_file_in_folder( EE_CLASSES );
146
-		EEH_Autoloader::register_autoloaders_for_each_file_in_folder( EE_FORM_SECTIONS, true );
141
+		EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_CORE.'interfaces');
142
+		EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_CORE);
143
+		EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_INTERFACES, true);
144
+		EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_MODELS, true);
145
+		EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_CLASSES);
146
+		EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_FORM_SECTIONS, true);
147 147
 	}
148 148
 
149 149
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	 * 	@return void
170 170
 	 */
171 171
 	public static function register_line_item_display_autoloaders() {
172
-		EEH_Autoloader::register_autoloaders_for_each_file_in_folder(  EE_LIBRARIES . 'line_item_display' , true );
172
+		EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_LIBRARIES.'line_item_display', true);
173 173
 	}
174 174
 
175 175
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	 * 	@return void
183 183
 	 */
184 184
 	public static function register_line_item_filter_autoloaders() {
185
-		EEH_Autoloader::register_autoloaders_for_each_file_in_folder(  EE_LIBRARIES . 'line_item_filters' , true );
185
+		EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_LIBRARIES.'line_item_filters', true);
186 186
 	}
187 187
 
188 188
 
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	 * 	@return void
196 196
 	 */
197 197
 	public static function register_template_part_autoloaders() {
198
-		EEH_Autoloader::register_autoloaders_for_each_file_in_folder( EE_LIBRARIES . 'template_parts', true );
198
+		EEH_Autoloader::register_autoloaders_for_each_file_in_folder(EE_LIBRARIES.'template_parts', true);
199 199
 	}
200 200
 
201 201
 
@@ -213,30 +213,30 @@  discard block
 block discarded – undo
213 213
 	 * @return void
214 214
 	 * @throws \EE_Error
215 215
 	 */
216
-	public static function register_autoloaders_for_each_file_in_folder( $folder, $recursive = false, $debug = false ){
216
+	public static function register_autoloaders_for_each_file_in_folder($folder, $recursive = false, $debug = false) {
217 217
 		// make sure last char is a /
218
-		$folder .= $folder[strlen($folder)-1] != DS ? DS : '';
218
+		$folder .= $folder[strlen($folder) - 1] != DS ? DS : '';
219 219
 		$class_to_filepath_map = array();
220
-		$exclude = array( 'index' );
220
+		$exclude = array('index');
221 221
 		//get all the files in that folder that end in php
222
-		$filepaths = glob( $folder.'*');
222
+		$filepaths = glob($folder.'*');
223 223
 
224
-		if ( empty( $filepaths ) ) {
224
+		if (empty($filepaths)) {
225 225
 			return;
226 226
 		}
227 227
 
228
-		foreach( $filepaths as $filepath ) {
229
-			if ( substr( $filepath, -4, 4 ) == '.php' ) {
230
-				$class_name = EEH_File::get_classname_from_filepath_with_standard_filename( $filepath );
231
-				if ( ! in_array( $class_name, $exclude )) {
232
-					$class_to_filepath_map [ $class_name ] = $filepath;
228
+		foreach ($filepaths as $filepath) {
229
+			if (substr($filepath, -4, 4) == '.php') {
230
+				$class_name = EEH_File::get_classname_from_filepath_with_standard_filename($filepath);
231
+				if ( ! in_array($class_name, $exclude)) {
232
+					$class_to_filepath_map [$class_name] = $filepath;
233 233
 				}
234
-			} else if ( $recursive ) {
235
-				EEH_Autoloader::register_autoloaders_for_each_file_in_folder( $filepath, $recursive );
234
+			} else if ($recursive) {
235
+				EEH_Autoloader::register_autoloaders_for_each_file_in_folder($filepath, $recursive);
236 236
 			}
237 237
 		}
238 238
 		// we remove the necessity to do a is_readable() check via the $read_check flag because glob by nature will not return non_readable files/directories.
239
-		self::register_autoloader( $class_to_filepath_map, false, $debug );
239
+		self::register_autoloader($class_to_filepath_map, false, $debug);
240 240
 	}
241 241
 
242 242
 
Please login to merge, or discard this patch.
core/helpers/EEH_Event_View.helper.php 1 patch
Spacing   +118 added lines, -118 removed lines patch added patch discarded remove patch
@@ -40,27 +40,27 @@  discard block
 block discarded – undo
40 40
 	 * @param    int $EVT_ID
41 41
 	 * @return    object
42 42
 	 */
43
-	public static function get_event( $EVT_ID = 0 ) {
44
-		$EVT_ID = $EVT_ID instanceof WP_Post ? $EVT_ID->ID : absint( $EVT_ID );
43
+	public static function get_event($EVT_ID = 0) {
44
+		$EVT_ID = $EVT_ID instanceof WP_Post ? $EVT_ID->ID : absint($EVT_ID);
45 45
 		// do we already have the Event  you are looking for?
46
-		if ( EEH_Event_View::$_event instanceof EE_Event && $EVT_ID && EEH_Event_View::$_event->ID() === $EVT_ID ) {
46
+		if (EEH_Event_View::$_event instanceof EE_Event && $EVT_ID && EEH_Event_View::$_event->ID() === $EVT_ID) {
47 47
 			return EEH_Event_View::$_event;
48 48
 		}
49 49
 		EEH_Event_View::$_event = NULL;
50 50
 		// international newspaper?
51 51
 		global $post;
52 52
 		// if this is being called from an EE_Event post, then we can just grab the attached EE_Event object
53
-		 if ( isset( $post->post_type ) && $post->post_type == 'espresso_events' || $EVT_ID ) {
53
+		 if (isset($post->post_type) && $post->post_type == 'espresso_events' || $EVT_ID) {
54 54
 //			d( $post );
55 55
 			// grab the event we're looking for
56
-			if ( isset( $post->EE_Event ) && ( $EVT_ID == 0 || ( $EVT_ID == $post->ID ))) {
56
+			if (isset($post->EE_Event) && ($EVT_ID == 0 || ($EVT_ID == $post->ID))) {
57 57
 				EEH_Event_View::$_event = $post->EE_Event;
58 58
 //				d( EEH_Event_View::$_event );
59 59
 			}
60 60
 			// now if we STILL do NOT have an EE_Event model object, BUT we have an Event ID...
61
-			if ( ! EEH_Event_View::$_event instanceof EE_Event && $EVT_ID ) {
61
+			if ( ! EEH_Event_View::$_event instanceof EE_Event && $EVT_ID) {
62 62
 				// sigh... pull it from the db
63
-				EEH_Event_View::$_event = EEM_Event::instance()->get_one_by_ID( $EVT_ID );
63
+				EEH_Event_View::$_event = EEM_Event::instance()->get_one_by_ID($EVT_ID);
64 64
 //				d( EEH_Event_View::$_event );
65 65
 			}
66 66
 		}
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 	 * @param    int $EVT_ID
77 77
 	 * @return    boolean
78 78
 	 */
79
-	public static function display_ticket_selector( $EVT_ID = 0 ) {
80
-		$event = EEH_Event_View::get_event( $EVT_ID );
79
+	public static function display_ticket_selector($EVT_ID = 0) {
80
+		$event = EEH_Event_View::get_event($EVT_ID);
81 81
 		return $event instanceof EE_Event ? $event->display_ticket_selector() : FALSE;
82 82
 	}
83 83
 
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 	 * @param    int $EVT_ID
91 91
 	 * @return    string
92 92
 	 */
93
-	public static function event_status( $EVT_ID = 0 ) {
94
-		$event = EEH_Event_View::get_event( $EVT_ID );
95
-		return $event instanceof EE_Event ? $event->pretty_active_status( FALSE ) : '';
93
+	public static function event_status($EVT_ID = 0) {
94
+		$event = EEH_Event_View::get_event($EVT_ID);
95
+		return $event instanceof EE_Event ? $event->pretty_active_status(FALSE) : '';
96 96
 	}
97 97
 
98 98
 
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 	 * @param    int $EVT_ID
105 105
 	 *  @return 	string
106 106
 	 */
107
-	public static function event_active_status( $EVT_ID = 0 ) {
108
-		$event = EEH_Event_View::get_event( $EVT_ID );
107
+	public static function event_active_status($EVT_ID = 0) {
108
+		$event = EEH_Event_View::get_event($EVT_ID);
109 109
 		return $event instanceof EE_Event ? $event->pretty_active_status() : 'inactive';
110 110
 	}
111 111
 
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
 	 * @param    int $EVT_ID
119 119
 	 *  @return 	string
120 120
 	 */
121
-	public static function event_has_content_or_excerpt( $EVT_ID = 0 ) {
122
-		$event = EEH_Event_View::get_event( $EVT_ID );
121
+	public static function event_has_content_or_excerpt($EVT_ID = 0) {
122
+		$event = EEH_Event_View::get_event($EVT_ID);
123 123
 		$has_content_or_excerpt = FALSE;
124
-		if ( $event instanceof EE_Event ) {
125
-			$has_content_or_excerpt = $event->description() != '' || $event->short_description( NULL, NULL, TRUE ) != '' ? TRUE : FALSE;
124
+		if ($event instanceof EE_Event) {
125
+			$has_content_or_excerpt = $event->description() != '' || $event->short_description(NULL, NULL, TRUE) != '' ? TRUE : FALSE;
126 126
 		}
127
-		if ( is_archive() && ! ( espresso_display_full_description_in_event_list() || espresso_display_excerpt_in_event_list() )) {
127
+		if (is_archive() && ! (espresso_display_full_description_in_event_list() || espresso_display_excerpt_in_event_list())) {
128 128
 			$has_content_or_excerpt = FALSE;
129 129
 		}
130 130
 		return $has_content_or_excerpt;
@@ -140,45 +140,45 @@  discard block
 block discarded – undo
140 140
 	 * @param null $more
141 141
 	 * @return    string
142 142
 	 */
143
-	public static function event_content_or_excerpt( $num_words = NULL, $more = NULL ) {
143
+	public static function event_content_or_excerpt($num_words = NULL, $more = NULL) {
144 144
 		global $post;
145 145
 
146 146
 		ob_start();
147
-		if (( is_single() ) || ( is_archive() && espresso_display_full_description_in_event_list() )) {
147
+		if ((is_single()) || (is_archive() && espresso_display_full_description_in_event_list())) {
148 148
 
149 149
 			// admin has chosen "full description" for the "Event Espresso - Events > Templates > Display Description" option
150 150
 			the_content();
151 151
 
152
-		} else if (( is_archive() && has_excerpt( $post->ID ) && espresso_display_excerpt_in_event_list() ) ) {
152
+		} else if ((is_archive() && has_excerpt($post->ID) && espresso_display_excerpt_in_event_list())) {
153 153
 
154 154
 			// admin has chosen "excerpt (short desc)" for the "Event Espresso - Events > Templates > Display Description" option
155 155
 			// AND an excerpt actually exists
156 156
 			the_excerpt();
157 157
 
158
-		} else if (( is_archive() && ! has_excerpt( $post->ID ) && espresso_display_excerpt_in_event_list() )) {
158
+		} else if ((is_archive() && ! has_excerpt($post->ID) && espresso_display_excerpt_in_event_list())) {
159 159
 
160 160
 			// admin has chosen "excerpt (short desc)" for the "Event Espresso - Events > Templates > Display Description" option
161 161
 			// but NO excerpt actually exists, so we need to create one
162
-			if ( ! empty( $num_words )) {
163
-				if ( empty( $more )) {
164
-					$more_link_text = __( '(more&hellip;)' );
165
-					$more = ' <a href="' . get_permalink() . '" class="more-link">' . $more_link_text . '</a>';
166
-					$more = apply_filters( 'the_content_more_link', $more, $more_link_text );
162
+			if ( ! empty($num_words)) {
163
+				if (empty($more)) {
164
+					$more_link_text = __('(more&hellip;)');
165
+					$more = ' <a href="'.get_permalink().'" class="more-link">'.$more_link_text.'</a>';
166
+					$more = apply_filters('the_content_more_link', $more, $more_link_text);
167 167
 				}
168
-				$content = str_replace( 'NOMORELINK', '', get_the_content( 'NOMORELINK' ));
168
+				$content = str_replace('NOMORELINK', '', get_the_content('NOMORELINK'));
169 169
 
170
-				$content =  wp_trim_words( $content, $num_words, ' ' ) . $more;
170
+				$content = wp_trim_words($content, $num_words, ' ').$more;
171 171
 			} else {
172
-				$content =  get_the_content();
172
+				$content = get_the_content();
173 173
 			}
174 174
 			global $allowedtags;
175
-			$content = wp_kses( $content, $allowedtags );
176
-			$content = strip_shortcodes( $content );
177
-			echo apply_filters( 'the_content', $content );
175
+			$content = wp_kses($content, $allowedtags);
176
+			$content = strip_shortcodes($content);
177
+			echo apply_filters('the_content', $content);
178 178
 
179 179
 		} else {
180 180
 			// admin has chosen "none" for the "Event Espresso - Events > Templates > Display Description" option
181
-			echo apply_filters( 'the_content', '' );
181
+			echo apply_filters('the_content', '');
182 182
 		}
183 183
 		return ob_get_clean();
184 184
 	}
@@ -192,13 +192,13 @@  discard block
 block discarded – undo
192 192
 	 * @param    int $EVT_ID
193 193
 	 *  @return 	EE_Ticket[]
194 194
 	 */
195
-	public static function event_tickets_available( $EVT_ID = 0 ) {
196
-		$event = EEH_Event_View::get_event( $EVT_ID );
195
+	public static function event_tickets_available($EVT_ID = 0) {
196
+		$event = EEH_Event_View::get_event($EVT_ID);
197 197
 		$tickets_available_for_purchase = array();
198
-		if( $event instanceof EE_Event ) {
199
-			$datetimes = EEH_Event_View::get_all_date_obj( $EVT_ID, FALSE );
200
-			foreach( $datetimes as $datetime ) {
201
-				$tickets_available_for_purchase = array_merge( $tickets_available_for_purchase, $datetime->ticket_types_available_for_purchase() );
198
+		if ($event instanceof EE_Event) {
199
+			$datetimes = EEH_Event_View::get_all_date_obj($EVT_ID, FALSE);
200
+			foreach ($datetimes as $datetime) {
201
+				$tickets_available_for_purchase = array_merge($tickets_available_for_purchase, $datetime->ticket_types_available_for_purchase());
202 202
 			}
203 203
 		}
204 204
 		return $tickets_available_for_purchase;
@@ -214,22 +214,22 @@  discard block
 block discarded – undo
214 214
 	 * @param 	  bool   $hide_uncategorized
215 215
 	 * @return    string
216 216
 	 */
217
-	public static function event_categories( $EVT_ID = 0, $hide_uncategorized = TRUE ) {
217
+	public static function event_categories($EVT_ID = 0, $hide_uncategorized = TRUE) {
218 218
 		$category_links = array();
219
-		$event = EEH_Event_View::get_event( $EVT_ID );
220
-		if ( $event instanceof EE_Event ) {
221
-			$event_categories = get_the_terms( $event->ID(), 'espresso_event_categories' );
222
-			if ( $event_categories ) {
219
+		$event = EEH_Event_View::get_event($EVT_ID);
220
+		if ($event instanceof EE_Event) {
221
+			$event_categories = get_the_terms($event->ID(), 'espresso_event_categories');
222
+			if ($event_categories) {
223 223
 				// loop thru terms and create links
224
-				foreach ( $event_categories as $term ) {
225
-					$url = get_term_link( $term, 'espresso_venue_categories' );
226
-					if ( ! is_wp_error( $url ) && (( $hide_uncategorized && strtolower( $term->name ) != __( 'uncategorized', 'event_espresso' )) || ! $hide_uncategorized )) {
227
-						$category_links[] = '<a href="' . esc_url( $url ) . '" rel="tag">' . $term->name . '</a>';
224
+				foreach ($event_categories as $term) {
225
+					$url = get_term_link($term, 'espresso_venue_categories');
226
+					if ( ! is_wp_error($url) && (($hide_uncategorized && strtolower($term->name) != __('uncategorized', 'event_espresso')) || ! $hide_uncategorized)) {
227
+						$category_links[] = '<a href="'.esc_url($url).'" rel="tag">'.$term->name.'</a>';
228 228
 					}
229 229
 				}
230 230
 			}
231 231
 		}
232
-		return implode( ', ', $category_links );
232
+		return implode(', ', $category_links);
233 233
 	}
234 234
 
235 235
 
@@ -243,10 +243,10 @@  discard block
 block discarded – undo
243 243
 	 * @param int    $EVT_ID
244 244
 	 * @return    string
245 245
 	 */
246
-	public static function the_event_date( $dt_frmt = 'D M jS', $tm_frmt = 'g:i a', $EVT_ID = 0 ) {
247
-		$datetime = EEH_Event_View::get_primary_date_obj( $EVT_ID );
248
-		$format = ! empty( $dt_frmt ) && ! empty( $tm_frmt ) ? $dt_frmt . ' ' . $tm_frmt : $dt_frmt . $tm_frmt;
249
-		return $datetime instanceof EE_Datetime ? $datetime->get_i18n_datetime( 'DTT_EVT_start', $format ) :  '';
246
+	public static function the_event_date($dt_frmt = 'D M jS', $tm_frmt = 'g:i a', $EVT_ID = 0) {
247
+		$datetime = EEH_Event_View::get_primary_date_obj($EVT_ID);
248
+		$format = ! empty($dt_frmt) && ! empty($tm_frmt) ? $dt_frmt.' '.$tm_frmt : $dt_frmt.$tm_frmt;
249
+		return $datetime instanceof EE_Datetime ? $datetime->get_i18n_datetime('DTT_EVT_start', $format) : '';
250 250
 	}
251 251
 
252 252
 
@@ -260,10 +260,10 @@  discard block
 block discarded – undo
260 260
 	 * @param int    $EVT_ID
261 261
 	 * @return    string
262 262
 	 */
263
-	public static function the_event_end_date( $dt_frmt = 'D M jS', $tm_frmt = 'g:i a', $EVT_ID = 0 ) {
264
-		$datetime = EEH_Event_View::get_last_date_obj( $EVT_ID );
265
-		$format = ! empty( $dt_frmt ) && ! empty( $tm_frmt ) ? $dt_frmt . ' ' . $tm_frmt : $dt_frmt . $tm_frmt;
266
-		return $datetime instanceof EE_Datetime ? $datetime->get_i18n_datetime( 'DTT_EVT_end', $format ) : '';
263
+	public static function the_event_end_date($dt_frmt = 'D M jS', $tm_frmt = 'g:i a', $EVT_ID = 0) {
264
+		$datetime = EEH_Event_View::get_last_date_obj($EVT_ID);
265
+		$format = ! empty($dt_frmt) && ! empty($tm_frmt) ? $dt_frmt.' '.$tm_frmt : $dt_frmt.$tm_frmt;
266
+		return $datetime instanceof EE_Datetime ? $datetime->get_i18n_datetime('DTT_EVT_end', $format) : '';
267 267
 	}
268 268
 
269 269
 
@@ -277,10 +277,10 @@  discard block
 block discarded – undo
277 277
 	 * @param int    $EVT_ID
278 278
 	 * @return    string
279 279
 	 */
280
-	public static function the_earliest_event_date( $dt_frmt = 'D M jS', $tm_frmt = 'g:i a', $EVT_ID = 0 ) {
281
-		$datetime = EEH_Event_View::get_earliest_date_obj( $EVT_ID );
282
-		$format = ! empty( $dt_frmt ) && ! empty( $tm_frmt ) ? $dt_frmt . ' ' . $tm_frmt : $dt_frmt . $tm_frmt;
283
-		return $datetime instanceof EE_Datetime ?  $datetime->get_i18n_datetime( 'DTT_EVT_start', $format ) : '';
280
+	public static function the_earliest_event_date($dt_frmt = 'D M jS', $tm_frmt = 'g:i a', $EVT_ID = 0) {
281
+		$datetime = EEH_Event_View::get_earliest_date_obj($EVT_ID);
282
+		$format = ! empty($dt_frmt) && ! empty($tm_frmt) ? $dt_frmt.' '.$tm_frmt : $dt_frmt.$tm_frmt;
283
+		return $datetime instanceof EE_Datetime ? $datetime->get_i18n_datetime('DTT_EVT_start', $format) : '';
284 284
 	}
285 285
 
286 286
 
@@ -294,10 +294,10 @@  discard block
 block discarded – undo
294 294
 	 * @param int    $EVT_ID
295 295
 	 * @return    string
296 296
 	 */
297
-	public static function the_latest_event_date( $dt_frmt = 'D M jS', $tm_frmt = 'g:i a', $EVT_ID = 0 ) {
298
-		$datetime = EEH_Event_View::get_last_date_obj( $EVT_ID );
299
-		$format = ! empty( $dt_frmt ) && ! empty( $tm_frmt ) ? $dt_frmt . ' ' . $tm_frmt : $dt_frmt . $tm_frmt;
300
-		return $datetime instanceof EE_Datetime ?  $datetime->get_i18n_datetime( 'DTT_EVT_end', $format ) : '';
297
+	public static function the_latest_event_date($dt_frmt = 'D M jS', $tm_frmt = 'g:i a', $EVT_ID = 0) {
298
+		$datetime = EEH_Event_View::get_last_date_obj($EVT_ID);
299
+		$format = ! empty($dt_frmt) && ! empty($tm_frmt) ? $dt_frmt.' '.$tm_frmt : $dt_frmt.$tm_frmt;
300
+		return $datetime instanceof EE_Datetime ? $datetime->get_i18n_datetime('DTT_EVT_end', $format) : '';
301 301
 	}
302 302
 
303 303
 
@@ -309,13 +309,13 @@  discard block
 block discarded – undo
309 309
 	 * @param int $EVT_ID
310 310
 	 * @return    string
311 311
 	 */
312
-	public static function event_date_as_calendar_page( $EVT_ID = 0 ) {
313
-		$datetime = EEH_Event_View::get_primary_date_obj( $EVT_ID );
314
-		if ( $datetime instanceof EE_Datetime ) {
312
+	public static function event_date_as_calendar_page($EVT_ID = 0) {
313
+		$datetime = EEH_Event_View::get_primary_date_obj($EVT_ID);
314
+		if ($datetime instanceof EE_Datetime) {
315 315
 	?>
316 316
 		<div class="event-date-calendar-page-dv">
317
-			<div class="event-date-calendar-page-month-dv"><?php echo $datetime->get_i18n_datetime( 'DTT_EVT_start', 'M' );?></div>
318
-			<div class="event-date-calendar-page-day-dv"><?php echo $datetime->start_date( 'd' );?></div>
317
+			<div class="event-date-calendar-page-month-dv"><?php echo $datetime->get_i18n_datetime('DTT_EVT_start', 'M'); ?></div>
318
+			<div class="event-date-calendar-page-day-dv"><?php echo $datetime->start_date('d'); ?></div>
319 319
 		</div>
320 320
 	<?php
321 321
 		}
@@ -330,17 +330,17 @@  discard block
 block discarded – undo
330 330
 	 * @param int $EVT_ID
331 331
 	 * @return    string
332 332
 	 */
333
-	public static function get_primary_date_obj( $EVT_ID = 0 ) {
334
-		$event = EEH_Event_View::get_event( $EVT_ID );
335
-		if ( $event instanceof EE_Event ) {
333
+	public static function get_primary_date_obj($EVT_ID = 0) {
334
+		$event = EEH_Event_View::get_event($EVT_ID);
335
+		if ($event instanceof EE_Event) {
336 336
 			$datetimes = $event->get_many_related(
337 337
 				'Datetime',
338 338
 				array(
339 339
 					'limit' => 1,
340
-					'order_by' => array( 'DTT_order' => 'ASC' )
340
+					'order_by' => array('DTT_order' => 'ASC')
341 341
 				)
342 342
 			);
343
-			return reset( $datetimes );
343
+			return reset($datetimes);
344 344
 		} else {
345 345
 			 return FALSE;
346 346
 		}
@@ -355,17 +355,17 @@  discard block
 block discarded – undo
355 355
 	 * @param int $EVT_ID
356 356
 	 * @return    string
357 357
 	 */
358
-	public static function get_last_date_obj( $EVT_ID = 0 ) {
359
-		$event = EEH_Event_View::get_event( $EVT_ID );
360
-		if ( $event instanceof EE_Event ) {
358
+	public static function get_last_date_obj($EVT_ID = 0) {
359
+		$event = EEH_Event_View::get_event($EVT_ID);
360
+		if ($event instanceof EE_Event) {
361 361
 			$datetimes = $event->get_many_related(
362 362
 				'Datetime',
363 363
 				array(
364 364
 					'limit' => 1,
365
-					'order_by' => array( 'DTT_order' => 'DESC' )
365
+					'order_by' => array('DTT_order' => 'DESC')
366 366
 				)
367 367
 			);
368
-			return end( $datetimes );
368
+			return end($datetimes);
369 369
 		} else {
370 370
 			return FALSE;
371 371
 		}
@@ -380,17 +380,17 @@  discard block
 block discarded – undo
380 380
 	 * @param int $EVT_ID
381 381
 	 * @return    string
382 382
 	 */
383
-	public static function get_earliest_date_obj( $EVT_ID = 0 ) {
384
-		$event = EEH_Event_View::get_event( $EVT_ID );
385
-		if ( $event instanceof EE_Event ) {
383
+	public static function get_earliest_date_obj($EVT_ID = 0) {
384
+		$event = EEH_Event_View::get_event($EVT_ID);
385
+		if ($event instanceof EE_Event) {
386 386
 			$datetimes = $event->get_many_related(
387 387
 				'Datetime',
388 388
 				array(
389 389
 					'limit' => 1,
390
-					'order_by' => array( 'DTT_EVT_start' => 'ASC' )
390
+					'order_by' => array('DTT_EVT_start' => 'ASC')
391 391
 				)
392 392
 			);
393
-			return reset( $datetimes );
393
+			return reset($datetimes);
394 394
 		} else {
395 395
 			 return FALSE;
396 396
 		}
@@ -405,17 +405,17 @@  discard block
 block discarded – undo
405 405
 	 * @param int $EVT_ID
406 406
 	 * @return    string
407 407
 	 */
408
-	public static function get_latest_date_obj( $EVT_ID = 0 ) {
409
-		$event = EEH_Event_View::get_event( $EVT_ID );
410
-		if ( $event instanceof EE_Event ) {
408
+	public static function get_latest_date_obj($EVT_ID = 0) {
409
+		$event = EEH_Event_View::get_event($EVT_ID);
410
+		if ($event instanceof EE_Event) {
411 411
 			$datetimes = $event->get_many_related(
412 412
 				'Datetime',
413 413
 				array(
414 414
 					'limit' => 1,
415
-					'order_by' => array( 'DTT_EVT_start' => 'DESC' )
415
+					'order_by' => array('DTT_EVT_start' => 'DESC')
416 416
 				)
417 417
 			);
418
-			return end( $datetimes );
418
+			return end($datetimes);
419 419
 		} else {
420 420
 			return FALSE;
421 421
 		}
@@ -433,17 +433,17 @@  discard block
 block discarded – undo
433 433
 	 * @param null $limit
434 434
 	 * @return EE_Datetime[]
435 435
 	 */
436
-	public static function get_all_date_obj( $EVT_ID = 0, $include_expired = null, $include_deleted = false, $limit = NULL ) {
437
-		$event = EEH_Event_View::get_event( $EVT_ID );
438
-		if($include_expired === null){
439
-			if($event instanceof EE_Event && $event->is_expired()){
436
+	public static function get_all_date_obj($EVT_ID = 0, $include_expired = null, $include_deleted = false, $limit = NULL) {
437
+		$event = EEH_Event_View::get_event($EVT_ID);
438
+		if ($include_expired === null) {
439
+			if ($event instanceof EE_Event && $event->is_expired()) {
440 440
 				$include_expired = true;
441
-			}else{
441
+			} else {
442 442
 				$include_expired = false;
443 443
 			}
444 444
 		}
445 445
 
446
-		if ( $event instanceof EE_Event ) {
446
+		if ($event instanceof EE_Event) {
447 447
 			return $event->datetimes_ordered($include_expired, $include_deleted, $limit);
448 448
 		} else {
449 449
 			 return array();
@@ -459,11 +459,11 @@  discard block
 block discarded – undo
459 459
 	 * @param int $EVT_ID
460 460
 	 * @return    string
461 461
 	 */
462
-	public static function event_link_url( $EVT_ID = 0 ) {
463
-		$event = EEH_Event_View::get_event( $EVT_ID );
464
-		if ( $event instanceof EE_Event ) {
465
-			$url = $event->external_url() !== NULL && $event->external_url() !== '' ? $event->external_url() : get_permalink( $event->ID() );
466
-			return preg_match( "~^(?:f|ht)tps?://~i", $url ) ? $url : 'http://' . $url;
462
+	public static function event_link_url($EVT_ID = 0) {
463
+		$event = EEH_Event_View::get_event($EVT_ID);
464
+		if ($event instanceof EE_Event) {
465
+			$url = $event->external_url() !== NULL && $event->external_url() !== '' ? $event->external_url() : get_permalink($event->ID());
466
+			return preg_match("~^(?:f|ht)tps?://~i", $url) ? $url : 'http://'.$url;
467 467
 		}
468 468
 		return NULL;
469 469
 	}
@@ -477,11 +477,11 @@  discard block
 block discarded – undo
477 477
 	 * @param int $EVT_ID
478 478
 	 * @return    string
479 479
 	 */
480
-	public static function event_phone( $EVT_ID = 0 ) {
481
-		$event = EEH_Event_View::get_event( $EVT_ID );
482
-		if ( $event instanceof EE_Event ) {
483
-			EE_Registry::instance()->load_helper( 'Formatter' );
484
-			return EEH_Schema::telephone( $event->phone() );
480
+	public static function event_phone($EVT_ID = 0) {
481
+		$event = EEH_Event_View::get_event($EVT_ID);
482
+		if ($event instanceof EE_Event) {
483
+			EE_Registry::instance()->load_helper('Formatter');
484
+			return EEH_Schema::telephone($event->phone());
485 485
 		}
486 486
 		return NULL;
487 487
 	}
@@ -498,23 +498,23 @@  discard block
 block discarded – undo
498 498
 	 * @param string $after
499 499
 	 * @return    string
500 500
 	 */
501
-	public static function edit_event_link( $EVT_ID = 0, $link = '', $before = '', $after = '' ) {
502
-		$event = EEH_Event_View::get_event( $EVT_ID );
503
-		if ( $event instanceof EE_Event ) {
501
+	public static function edit_event_link($EVT_ID = 0, $link = '', $before = '', $after = '') {
502
+		$event = EEH_Event_View::get_event($EVT_ID);
503
+		if ($event instanceof EE_Event) {
504 504
 			// can the user edit this post ?
505
-			if ( current_user_can( 'edit_post', $event->ID() )) {
505
+			if (current_user_can('edit_post', $event->ID())) {
506 506
 				// set link text
507
-				$link = ! empty( $link ) ? $link : __('edit this event');
507
+				$link = ! empty($link) ? $link : __('edit this event');
508 508
 				// generate nonce
509
-				$nonce = wp_create_nonce( 'edit_nonce' );
509
+				$nonce = wp_create_nonce('edit_nonce');
510 510
 				// generate url to event editor for this event
511
-				$url = add_query_arg( array( 'page' => 'espresso_events', 'action' => 'edit', 'post' => $event->ID(), 'edit_nonce' => $nonce ), admin_url() );
511
+				$url = add_query_arg(array('page' => 'espresso_events', 'action' => 'edit', 'post' => $event->ID(), 'edit_nonce' => $nonce), admin_url());
512 512
 				// get edit CPT text
513
-				$post_type_obj = get_post_type_object( 'espresso_events' );
513
+				$post_type_obj = get_post_type_object('espresso_events');
514 514
 				// build final link html
515
-				$link = '<a class="post-edit-link" href="' . $url . '" title="' . esc_attr( $post_type_obj->labels->edit_item ) . '">' . $link . '</a>';
515
+				$link = '<a class="post-edit-link" href="'.$url.'" title="'.esc_attr($post_type_obj->labels->edit_item).'">'.$link.'</a>';
516 516
 				// put it all together
517
-				return $before . apply_filters( 'edit_post_link', $link, $event->ID() ) . $after;
517
+				return $before.apply_filters('edit_post_link', $link, $event->ID()).$after;
518 518
 			}
519 519
 		}
520 520
 		return '';
Please login to merge, or discard this patch.
core/helpers/EEH_URL.helper.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  *
10 10
  * ------------------------------------------------------------------------
11 11
  */
12
-class EEH_URL{
12
+class EEH_URL {
13 13
 
14 14
 	/**
15 15
 	 * _add_query_arg
@@ -21,28 +21,28 @@  discard block
 block discarded – undo
21 21
 	 * @param bool  $exclude_nonce  If true then the nonce will be excluded from the generated url.
22 22
 	 * @return string
23 23
 	 */
24
-	public static function add_query_args_and_nonce( $args = array(), $url = '', $exclude_nonce = false ) {
25
-		if ( empty( $url ) ) {
26
-			$user_msg = __('An error occurred. A URL is a required parameter for the add_query_args_and_nonce method.', 'event_espresso' );
27
-			$dev_msg = $user_msg . "\n" . sprintf(
28
-					__('In order to dynamically generate nonces for your actions, you need to supply a valid URL as a second parameter for the %s::add_query_args_and_nonce method.', 'event_espresso' ),
24
+	public static function add_query_args_and_nonce($args = array(), $url = '', $exclude_nonce = false) {
25
+		if (empty($url)) {
26
+			$user_msg = __('An error occurred. A URL is a required parameter for the add_query_args_and_nonce method.', 'event_espresso');
27
+			$dev_msg = $user_msg."\n".sprintf(
28
+					__('In order to dynamically generate nonces for your actions, you need to supply a valid URL as a second parameter for the %s::add_query_args_and_nonce method.', 'event_espresso'),
29 29
 					__CLASS__
30 30
 				);
31
-			EE_Error::add_error( $user_msg . '||' . $dev_msg, __FILE__, __FUNCTION__, __LINE__ );
31
+			EE_Error::add_error($user_msg.'||'.$dev_msg, __FILE__, __FUNCTION__, __LINE__);
32 32
 		}
33 33
 		// check that an action exists and add nonce
34
-		if ( ! $exclude_nonce ) {
35
-			if ( isset( $args['action'] ) && ! empty( $args['action'] ) ) {
36
-				$args = array_merge( $args, array( $args['action'] . '_nonce' => wp_create_nonce( $args['action'] . '_nonce' ) ) );
34
+		if ( ! $exclude_nonce) {
35
+			if (isset($args['action']) && ! empty($args['action'])) {
36
+				$args = array_merge($args, array($args['action'].'_nonce' => wp_create_nonce($args['action'].'_nonce')));
37 37
 			} else {
38
-				$args = array_merge( $args, array( 'action' => 'default', 'default_nonce' => wp_create_nonce( 'default_nonce' ) ) );
38
+				$args = array_merge($args, array('action' => 'default', 'default_nonce' => wp_create_nonce('default_nonce')));
39 39
 			}
40 40
 		}
41 41
 
42 42
 		//finally, let's always add a return address (if present) :)
43
-		$args = ! empty( $_REQUEST['action'] ) ? array_merge( $args, array( 'return' => $_REQUEST['action'] ) ) : $args;
43
+		$args = ! empty($_REQUEST['action']) ? array_merge($args, array('return' => $_REQUEST['action'])) : $args;
44 44
 
45
-		return add_query_arg( $args, $url );
45
+		return add_query_arg($args, $url);
46 46
 
47 47
 	}
48 48
 
@@ -55,17 +55,17 @@  discard block
 block discarded – undo
55 55
 	 * @param boolean $sslverify whether we care if the SSL certificate for the requested site is setup properly
56 56
 	 * @return boolean
57 57
 	 */
58
-	public static function remote_file_exists( $url, $args = array() ){
59
-		$results = wp_remote_request($url,array_merge( array(
58
+	public static function remote_file_exists($url, $args = array()) {
59
+		$results = wp_remote_request($url, array_merge(array(
60 60
 			'method'=>'GET',
61 61
 			'redirection'=>1
62
-		), $args ) );
63
-		if( ! $results instanceof WP_Error &&
62
+		), $args));
63
+		if ( ! $results instanceof WP_Error &&
64 64
 				isset($results['response']) &&
65 65
 				isset($results['response']['code']) &&
66
-				$results['response']['code'] == '200'){
66
+				$results['response']['code'] == '200') {
67 67
 			return true;
68
-		}else{
68
+		} else {
69 69
 			return false;
70 70
 		}
71 71
 	}
@@ -81,29 +81,29 @@  discard block
 block discarded – undo
81 81
 	 * @param bool   $base_url_only - TRUE will only return the scheme and host with no other parameters
82 82
 	 * @return string
83 83
 	 */
84
-	public static function refactor_url( $url = '', $remove_query = TRUE, $base_url_only = FALSE ) {
84
+	public static function refactor_url($url = '', $remove_query = TRUE, $base_url_only = FALSE) {
85 85
 		// break apart incoming URL
86
-		$url_bits = parse_url( $url );
86
+		$url_bits = parse_url($url);
87 87
 		// HTTP or HTTPS ?
88
-		$scheme = isset( $url_bits[ 'scheme' ] ) ? $url_bits[ 'scheme' ] . '://' : 'http://';
88
+		$scheme = isset($url_bits['scheme']) ? $url_bits['scheme'].'://' : 'http://';
89 89
 		// domain
90
-		$host = isset( $url_bits[ 'host' ] ) ? $url_bits[ 'host' ] : '';
90
+		$host = isset($url_bits['host']) ? $url_bits['host'] : '';
91 91
 		// if only the base URL is requested, then return that now
92
-		if ( $base_url_only ) {
93
-			return $scheme . $host;
92
+		if ($base_url_only) {
93
+			return $scheme.$host;
94 94
 		}
95
-		$port = isset( $url_bits[ 'port' ] ) ? ':' . $url_bits[ 'port' ] : '';
96
-		$user = isset( $url_bits[ 'user' ] ) ? $url_bits[ 'user' ] : '';
97
-		$pass = isset( $url_bits[ 'pass' ] ) ? ':' . $url_bits[ 'pass' ] : '';
98
-		$pass = ( $user || $pass ) ? $pass . '@' : '';
99
-		$path = isset( $url_bits[ 'path' ] ) ? $url_bits[ 'path' ] : '';
95
+		$port = isset($url_bits['port']) ? ':'.$url_bits['port'] : '';
96
+		$user = isset($url_bits['user']) ? $url_bits['user'] : '';
97
+		$pass = isset($url_bits['pass']) ? ':'.$url_bits['pass'] : '';
98
+		$pass = ($user || $pass) ? $pass.'@' : '';
99
+		$path = isset($url_bits['path']) ? $url_bits['path'] : '';
100 100
 		// if the query string is not required, then return what we have so far
101
-		if ( $remove_query ) {
102
-			return $scheme . $user . $pass . $host . $port . $path;
101
+		if ($remove_query) {
102
+			return $scheme.$user.$pass.$host.$port.$path;
103 103
 		}
104
-		$query = isset( $url_bits[ 'query' ] ) ? '?' . $url_bits[ 'query' ] : '';
105
-		$fragment = isset( $url_bits[ 'fragment' ] ) ? '#' . $url_bits[ 'fragment' ] : '';
106
-		return $scheme . $user . $pass . $host . $port . $path . $query . $fragment;
104
+		$query = isset($url_bits['query']) ? '?'.$url_bits['query'] : '';
105
+		$fragment = isset($url_bits['fragment']) ? '#'.$url_bits['fragment'] : '';
106
+		return $scheme.$user.$pass.$host.$port.$path.$query.$fragment;
107 107
 	}
108 108
 
109 109
 
@@ -116,29 +116,29 @@  discard block
 block discarded – undo
116 116
 	 * @param bool   $as_array TRUE (default) will return query params as an array of key value pairs, FALSE will simply return the query string
117 117
 	 * @return string|array
118 118
 	 */
119
-	public static function get_query_string( $url = '', $as_array = TRUE ) {
119
+	public static function get_query_string($url = '', $as_array = TRUE) {
120 120
 		// break apart incoming URL
121
-		$url_bits = parse_url( $url );
121
+		$url_bits = parse_url($url);
122 122
 		// grab query string from URL
123
-		$query = isset( $url_bits[ 'query' ] ) ? $url_bits[ 'query' ] : '';
123
+		$query = isset($url_bits['query']) ? $url_bits['query'] : '';
124 124
 		// if we don't want the query string formatted into an array of key => value pairs, then just return it as is
125
-		if ( ! $as_array ) {
125
+		if ( ! $as_array) {
126 126
 			return $query;
127 127
 		}
128 128
 		// if no query string exists then just return an empty array now
129
-		if ( empty( $query )) {
129
+		if (empty($query)) {
130 130
 			return array();
131 131
 		}
132 132
 		// empty array to hold results
133 133
 		$query_params = array();
134 134
 		// now break apart the query string into separate params
135
-		$query = explode( '&', $query );
135
+		$query = explode('&', $query);
136 136
 		// loop thru our query params
137
-		foreach ( $query as $query_args ) {
137
+		foreach ($query as $query_args) {
138 138
 			// break apart the key value pairs
139
-			$query_args = explode( '=', $query_args );
139
+			$query_args = explode('=', $query_args);
140 140
 			// and add to our results array
141
-			$query_params[ $query_args[0] ] = $query_args[1];
141
+			$query_params[$query_args[0]] = $query_args[1];
142 142
 		}
143 143
 		return $query_params;
144 144
 	}
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 	 * prevent_prefetching
150 150
 	 * @return void
151 151
 	 */
152
-	public static function prevent_prefetching(){
152
+	public static function prevent_prefetching() {
153 153
 		// prevent browsers from prefetching of the rel='next' link, because it may contain content that interferes with the registration process
154 154
 		remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');
155 155
 	}
@@ -164,9 +164,9 @@  discard block
 block discarded – undo
164 164
 	 * @param   string $prefix Use this to prefix the string with something.
165 165
 	 * @return string
166 166
 	 */
167
-	public static function generate_unique_token( $prefix = '' ) {
168
-		$token =  md5( uniqid() . mt_rand() );
169
-		return $prefix ? $prefix . '_' . $token : $token;
167
+	public static function generate_unique_token($prefix = '') {
168
+		$token = md5(uniqid().mt_rand());
169
+		return $prefix ? $prefix.'_'.$token : $token;
170 170
 	}
171 171
 
172 172
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	 * add_nocache_headers
176 176
 	 * @return void
177 177
 	 */
178
-	public static function add_nocache_headers(){
178
+	public static function add_nocache_headers() {
179 179
 		// add no cache headers
180 180
 //		add_action( 'wp_head' , array( 'EED_Single_Page_Checkout', 'nocache_headers' ), 10 );
181 181
 		// plus a little extra for nginx
@@ -192,19 +192,19 @@  discard block
 block discarded – undo
192 192
 	 * @param string $server_variable
193 193
 	 * @return string
194 194
 	 */
195
-	public static function filter_input_server_url( $server_variable = 'REQUEST_URI' ){
195
+	public static function filter_input_server_url($server_variable = 'REQUEST_URI') {
196 196
 		$URL = '';
197 197
 		$server_variables = array(
198 198
 			'REQUEST_URI' => 1,
199 199
 			'HTTP_HOST' => 1,
200 200
 			'PHP_SELF' => 1,
201 201
 		);
202
-		$server_variable = strtoupper( $server_variable );
202
+		$server_variable = strtoupper($server_variable);
203 203
 		// whitelist INPUT_SERVER var
204
-		if ( isset( $server_variables[ $server_variable ] ) ) {
205
-			$URL = filter_input( INPUT_SERVER, $server_variable, FILTER_SANITIZE_URL, FILTER_NULL_ON_FAILURE );
206
-			if ( empty( $URL ) ) {
207
-				$URL = esc_url( $_SERVER[ $server_variable ] );
204
+		if (isset($server_variables[$server_variable])) {
205
+			$URL = filter_input(INPUT_SERVER, $server_variable, FILTER_SANITIZE_URL, FILTER_NULL_ON_FAILURE);
206
+			if (empty($URL)) {
207
+				$URL = esc_url($_SERVER[$server_variable]);
208 208
 			}
209 209
 		}
210 210
 		return $URL;
Please login to merge, or discard this patch.
core/interfaces/EEI_Interfaces.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 /**
6 6
  * Interface EEI_Base
7 7
  */
8
-interface EEI_Base{
8
+interface EEI_Base {
9 9
 	/**
10 10
 	 * gets the unique ID of the model object. If it hasn't been saved yet
11 11
 	 * to the database, this should be 0 or NULL
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @param 	EE_Response $response
49 49
 	 * @return 	EE_Response
50 50
 	 */
51
-	public function handle_request( EE_Request $request, EE_Response $response );
51
+	public function handle_request(EE_Request $request, EE_Response $response);
52 52
 }
53 53
 
54 54
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 * @param EE_Request $request
65 65
 	 * @param EE_Response $response
66 66
 	 */
67
-	public function handle_response( EE_Request $request, EE_Response $response );
67
+	public function handle_response(EE_Request $request, EE_Response $response);
68 68
 }
69 69
 
70 70
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	 * @param string $country
223 223
 	 * @param string $CNT_ISO
224 224
 	 */
225
-	public function format( $address, $address2, $city, $state, $zip, $country, $CNT_ISO );
225
+	public function format($address, $address2, $city, $state, $zip, $country, $CNT_ISO);
226 226
 }
227 227
 
228 228
 
@@ -232,13 +232,13 @@  discard block
 block discarded – undo
232 232
 /**
233 233
  * Interface EEHI_Line_Item
234 234
  */
235
-interface EEHI_Line_Item{
235
+interface EEHI_Line_Item {
236 236
 	/**
237 237
 	 * Adds an item to the purchase in the right spot
238 238
 	 * @param EE_Line_Item $total_line_item
239 239
 	 * @param EE_Line_Item $line_item
240 240
 	 */
241
-	public function add_item( EE_line_Item $total_line_item, EE_Line_Item $line_item );
241
+	public function add_item(EE_line_Item $total_line_item, EE_Line_Item $line_item);
242 242
 	/**
243 243
 	 * Overwrites the previous tax by clearing out the old taxes, and creates a new
244 244
 	 * tax and updates the total line item accordingly
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	 * @param string $description
249 249
 	 * @return EE_Line_Item the new tax created
250 250
 	 */
251
-	public function set_total_tax_to( EE_Line_Item $total_line_item, $amount, $name  = NULL, $description = NULL );
251
+	public function set_total_tax_to(EE_Line_Item $total_line_item, $amount, $name = NULL, $description = NULL);
252 252
 
253 253
 	/**
254 254
 	 * Adds a simple item ( unrelated to any other model object) to the total line item,
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
 	 * @param boolean $taxable
262 262
 	 * @return boolean success
263 263
 	 */
264
-	public function add_unrelated_item( EE_Line_Item $total_line_item, $name, $unit_price, $description = '', $quantity = 1, $taxable = FALSE );
264
+	public function add_unrelated_item(EE_Line_Item $total_line_item, $name, $unit_price, $description = '', $quantity = 1, $taxable = FALSE);
265 265
 }
266 266
 
267 267
 
268 268
 /**
269 269
  * Money-related helper
270 270
  */
271
-interface EEHI_Money{
271
+interface EEHI_Money {
272 272
 		/**
273 273
 	 * For comparing floats. Default operator is '=', but see the $operator below for all options.
274 274
 	 * This should be used to compare floats instead of normal '==' because floats
@@ -279,13 +279,13 @@  discard block
 block discarded – undo
279 279
 	 * $param string $operator  The operator. Valid options are =, <=, <, >=, >, <>, eq, lt, lte, gt, gte, ne
280 280
 	 * @return boolean whether the equation is true or false
281 281
 	 */
282
-	function compare_floats( $float1, $float2, $operator='=' );
282
+	function compare_floats($float1, $float2, $operator = '=');
283 283
 }
284 284
 
285 285
 /**
286 286
  * Interface EEHI_Template
287 287
  */
288
-interface EEHI_Template{
288
+interface EEHI_Template {
289 289
 
290 290
 	/**
291 291
 	 * EEH_Template::format_currency
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 	 * @param string   $cur_code_span_class
299 299
 	 * @return string the html output for the formatted money value
300 300
 	 */
301
-	public static function format_currency( $amount = NULL, $return_raw = FALSE, $display_code = TRUE, $CNT_ISO = '', $cur_code_span_class = 'currency-code' );
301
+	public static function format_currency($amount = NULL, $return_raw = FALSE, $display_code = TRUE, $CNT_ISO = '', $cur_code_span_class = 'currency-code');
302 302
 }
303 303
 
304 304
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 	 * @param array $options
314 314
 	 * @return mixed
315 315
 	 */
316
-	public function display_line_item( EE_Line_Item $line_item, $options = array() );
316
+	public function display_line_item(EE_Line_Item $line_item, $options = array());
317 317
 
318 318
 }
319 319
 
Please login to merge, or discard this patch.
strategies/validation/EE_Max_Length_Validation_Strategy.strategy.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,32 +8,32 @@
 block discarded – undo
8 8
  * @subpackage	Expression package is undefined on line 19, column 19 in Templates/Scripting/PHPClass.php.
9 9
  * @author				Mike Nelson
10 10
  */
11
-class EE_Max_Length_Validation_Strategy extends EE_Validation_Strategy_Base{
11
+class EE_Max_Length_Validation_Strategy extends EE_Validation_Strategy_Base {
12 12
 
13 13
 	protected $_max_length;
14 14
 
15
-	public function __construct( $validation_error_message = NULL, $max_length = EE_INF ) {
15
+	public function __construct($validation_error_message = NULL, $max_length = EE_INF) {
16 16
 		$this->_max_length = $max_length;
17
-		parent::__construct( $validation_error_message );
17
+		parent::__construct($validation_error_message);
18 18
 	}
19 19
 
20 20
 	/**
21 21
 	 * @param $normalized_value
22 22
 	 */
23 23
 	public function validate($normalized_value) {
24
-		if( $this->_max_length !== EE_INF &&
24
+		if ($this->_max_length !== EE_INF &&
25 25
 				$normalized_value &&
26
-				is_string( $normalized_value ) &&
27
-				 strlen( $normalized_value ) > $this->_max_length){
28
-			throw new EE_Validation_Error( $this->get_validation_error_message(), 'maxlength' );
26
+				is_string($normalized_value) &&
27
+				 strlen($normalized_value) > $this->_max_length) {
28
+			throw new EE_Validation_Error($this->get_validation_error_message(), 'maxlength');
29 29
 		}
30 30
 	}
31 31
 
32 32
 	/**
33 33
 	 * @return array
34 34
 	 */
35
-	function get_jquery_validation_rule_array(){
36
-		return array( 'maxlength'=> $this->_max_length, 'messages' => array( 'maxlength' => $this->get_validation_error_message() ) );
35
+	function get_jquery_validation_rule_array() {
36
+		return array('maxlength'=> $this->_max_length, 'messages' => array('maxlength' => $this->get_validation_error_message()));
37 37
 	}
38 38
 }
39 39
 
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Datetime_Shortcodes.lib.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 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
 /**
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 	 * @param string $shortcode
62 62
 	 * @return string
63 63
 	 */
64
-	protected function _parser( $shortcode ) {
64
+	protected function _parser($shortcode) {
65 65
 
66
-		if ( ! $this->_data instanceof EE_Datetime ) {
66
+		if ( ! $this->_data instanceof EE_Datetime) {
67 67
 			return ''; //get out cause we can only parse with the datetime object.
68 68
 		}
69 69
 
70
-		switch ( $shortcode ) {
70
+		switch ($shortcode) {
71 71
 
72 72
 			case '[DATETIME_START]' :
73 73
 				return $this->_data->get_i18n_datetime('DTT_EVT_start');
@@ -81,27 +81,27 @@  discard block
 block discarded – undo
81 81
 				return $this->_data->get_timezone();
82 82
 				break;
83 83
 			case '[DATE_START]' :
84
-				return $this->_data->get_i18n_datetime( 'DTT_EVT_start', get_option( 'date_format' ) );
84
+				return $this->_data->get_i18n_datetime('DTT_EVT_start', get_option('date_format'));
85 85
 				break;
86 86
 			case '[DATE_END]' :
87
-				return $this->_data->get_i18n_datetime( 'DTT_EVT_end', get_option( 'date_format' ) );
87
+				return $this->_data->get_i18n_datetime('DTT_EVT_end', get_option('date_format'));
88 88
 				break;
89 89
 			case '[TIME_START]' :
90
-				return $this->_data->get_i18n_datetime( 'DTT_EVT_start', get_option( 'time_format' ) );
90
+				return $this->_data->get_i18n_datetime('DTT_EVT_start', get_option('time_format'));
91 91
 				break;
92 92
 			case '[TIME_END]' :
93
-				return $this->_data->get_i18n_datetime( 'DTT_EVT_end', get_option( 'time_format' ) );
93
+				return $this->_data->get_i18n_datetime('DTT_EVT_end', get_option('time_format'));
94 94
 				break;
95 95
 		}
96 96
 
97
-		if ( strpos( $shortcode, '[ICAL_LINK_*') !== FALSE  ) {
98
-			$attrs = $this->_get_shortcode_attrs( $shortcode );
97
+		if (strpos($shortcode, '[ICAL_LINK_*') !== FALSE) {
98
+			$attrs = $this->_get_shortcode_attrs($shortcode);
99 99
 			
100
-			$link_text = empty( $attrs['link_text'] ) ?  __( 'Add to iCal Calendar', 'event_espresso' ) : $attrs['link_text'];
100
+			$link_text = empty($attrs['link_text']) ? __('Add to iCal Calendar', 'event_espresso') : $attrs['link_text'];
101 101
 			
102
-			$URL = add_query_arg( array( 'ee' => 'download_ics_file', 'ics_id' => $this->_data->ID() ), site_url() );
102
+			$URL = add_query_arg(array('ee' => 'download_ics_file', 'ics_id' => $this->_data->ID()), site_url());
103 103
 		
104
-			return '<a class="ee-ical" href="' . $URL . '">' . $link_text . '</a>';
104
+			return '<a class="ee-ical" href="'.$URL.'">'.$link_text.'</a>';
105 105
 			
106 106
 		}
107 107
 
Please login to merge, or discard this patch.
core/libraries/template_parts/EE_Template_Part.class.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,16 +5,16 @@
 block discarded – undo
5 5
 	exit( 'No direct script access allowed' );
6 6
 }
7 7
 /**
8
- * Class EE_Template_Part
9
- *
10
- * class for holding details about a template part
11
- *
12
- * @package               Event Espresso
13
- * @subpackage            core
14
- * @author                Brent Christensen
15
- * @since                 $VID:$
16
- *
17
- */
8
+	 * Class EE_Template_Part
9
+	 *
10
+	 * class for holding details about a template part
11
+	 *
12
+	 * @package               Event Espresso
13
+	 * @subpackage            core
14
+	 * @author                Brent Christensen
15
+	 * @since                 $VID:$
16
+	 *
17
+	 */
18 18
 class EE_Template_Part {
19 19
 
20 20
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 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\libraries\templates;
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
  * Class EE_Template_Part
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
 	 * @param string $template
48 48
 	 * @param int    $priority
49 49
 	 */
50
-	public function __construct( $name, $label, $template, $priority = 100 ) {
51
-		$this->set_name( $name );
52
-		$this->set_label( $label );
53
-		$this->set_template( $template );
54
-		$this->set_priority( $priority );
50
+	public function __construct($name, $label, $template, $priority = 100) {
51
+		$this->set_name($name);
52
+		$this->set_label($label);
53
+		$this->set_template($template);
54
+		$this->set_priority($priority);
55 55
 	}
56 56
 
57 57
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	/**
69 69
 	 * @param mixed $name
70 70
 	 */
71
-	public function set_name( $name ) {
71
+	public function set_name($name) {
72 72
 		$this->name = $name;
73 73
 	}
74 74
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	/**
87 87
 	 * @param string $label
88 88
 	 */
89
-	public function set_label( $label ) {
89
+	public function set_label($label) {
90 90
 		$this->label = $label;
91 91
 	}
92 92
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	/**
105 105
 	 * @param string $template
106 106
 	 */
107
-	public function set_template( $template ) {
107
+	public function set_template($template) {
108 108
 		$this->template = $template;
109 109
 	}
110 110
 
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
 	/**
123 123
 	 * @param int $priority
124 124
 	 */
125
-	public function set_priority( $priority ) {
126
-		$this->priority = intval( $priority );
125
+	public function set_priority($priority) {
126
+		$this->priority = intval($priority);
127 127
 	}
128 128
 
129 129
 
Please login to merge, or discard this patch.